From 27fc5dbde05e3b7981e3139823d7ee1960c43413 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Fri, 12 Jul 2024 12:37:42 +0300 Subject: [PATCH 01/17] Tm/network-slice (#5) New store structure --- package.json | 5 +- .../configuration}/getCleanApiAddress.ts | 5 +- .../configuration/getNetworkConfigFromApi.ts | 2 +- src/index.ts | 1 - src/store/actions/account/accountActions.ts | 62 ++ src/store/actions/account/index.ts | 1 + src/store/actions/constants.ts | 4 - src/store/actions/index.ts | 3 +- src/store/actions/network/index.ts | 1 + .../network}/initializeNetwork.ts | 14 +- src/store/actions/network/networkActions.ts | 26 + src/store/actions/sharedActions.ts | 9 - src/store/actions/sharedActions/index.ts | 1 + .../actions/sharedActions/sharedActions.ts | 14 + src/store/createBoundedStore.ts | 17 + src/store/helpers/eventHandlers.ts | 33 - src/store/index.ts | 2 - src/store/selectors/accountSelectors.ts | 7 + src/store/selectors/hooks/index.ts | 1 + src/store/selectors/hooks/useSelector.ts | 9 + src/store/selectors/index.ts | 3 + src/store/selectors/networkSelectors.ts | 8 + src/store/selectors/storeSelector.ts | 3 + src/store/slices/account/accountSlice.ts | 25 + src/store/slices/account/index.ts | 2 +- src/store/slices/helpers/getKeys.ts | 9 - src/store/slices/helpers/getReactStore.ts | 44 -- src/store/slices/helpers/types.ts | 7 - src/store/slices/index.ts | 2 +- src/store/slices/network/actions.ts | 44 -- src/store/slices/network/actions/index.ts | 2 - src/store/slices/network/index.ts | 3 +- src/store/slices/network/network.ts | 72 -- src/store/slices/network/networkSlice.ts | 19 + .../slices/network/networkSlice.types.ts | 5 + src/store/slices/shared/listenToLogout.ts | 6 - src/store/slices/shared/loggerMiddleware.ts | 44 -- src/store/store.ts | 44 ++ src/store/store.types.ts | 19 + yarn.lock | 722 +++++++++--------- 40 files changed, 642 insertions(+), 658 deletions(-) rename src/{store/slices/network/actions => apiCalls/configuration}/getCleanApiAddress.ts (57%) create mode 100644 src/store/actions/account/accountActions.ts create mode 100644 src/store/actions/account/index.ts delete mode 100644 src/store/actions/constants.ts create mode 100644 src/store/actions/network/index.ts rename src/store/{slices/network/actions => actions/network}/initializeNetwork.ts (77%) create mode 100644 src/store/actions/network/networkActions.ts delete mode 100644 src/store/actions/sharedActions.ts create mode 100644 src/store/actions/sharedActions/index.ts create mode 100644 src/store/actions/sharedActions/sharedActions.ts create mode 100644 src/store/createBoundedStore.ts delete mode 100644 src/store/helpers/eventHandlers.ts delete mode 100644 src/store/index.ts create mode 100644 src/store/selectors/accountSelectors.ts create mode 100644 src/store/selectors/hooks/index.ts create mode 100644 src/store/selectors/hooks/useSelector.ts create mode 100644 src/store/selectors/index.ts create mode 100644 src/store/selectors/networkSelectors.ts create mode 100644 src/store/selectors/storeSelector.ts create mode 100644 src/store/slices/account/accountSlice.ts delete mode 100644 src/store/slices/helpers/getKeys.ts delete mode 100644 src/store/slices/helpers/getReactStore.ts delete mode 100644 src/store/slices/helpers/types.ts delete mode 100644 src/store/slices/network/actions.ts delete mode 100644 src/store/slices/network/actions/index.ts delete mode 100644 src/store/slices/network/network.ts create mode 100644 src/store/slices/network/networkSlice.ts create mode 100644 src/store/slices/network/networkSlice.types.ts delete mode 100644 src/store/slices/shared/listenToLogout.ts delete mode 100644 src/store/slices/shared/loggerMiddleware.ts create mode 100644 src/store/store.ts create mode 100644 src/store/store.types.ts diff --git a/package.json b/package.json index c6f290a..eccb038 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-dapp-core", - "version": "0.0.0-alpha.8", + "version": "0.0.0-alpha.1", "main": "out/index.js", "module": "out/index.js", "types": "out/index.d.ts", @@ -31,6 +31,7 @@ }, "dependencies": { "@multiversx/sdk-native-auth-client": "^1.0.8", + "@multiversx/sdk-web-wallet-cross-window-provider": "0.2.0", "@types/lodash": "^4.17.4", "isomorphic-fetch": "^3.0.0", "lodash": "^4.17.21", @@ -39,7 +40,6 @@ "peerDependencies": { "@multiversx/sdk-core": ">= 13.0.0", "@multiversx/sdk-dapp-utils": "^0.0.1", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 0.4.2", "axios": ">=1.6.5", "bignumber.js": "9.x" }, @@ -49,7 +49,6 @@ "devDependencies": { "@multiversx/sdk-core": ">= 13.0.0", "@multiversx/sdk-dapp-utils": "^0.0.1", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 0.4.2", "@swc/core": "^1.4.17", "@swc/jest": "^0.2.36", "@types/node": "20.12.8", diff --git a/src/store/slices/network/actions/getCleanApiAddress.ts b/src/apiCalls/configuration/getCleanApiAddress.ts similarity index 57% rename from src/store/slices/network/actions/getCleanApiAddress.ts rename to src/apiCalls/configuration/getCleanApiAddress.ts index 81eaf19..bf5018b 100644 --- a/src/store/slices/network/actions/getCleanApiAddress.ts +++ b/src/apiCalls/configuration/getCleanApiAddress.ts @@ -1,7 +1,8 @@ -import { networkStore } from '../network'; +import { networkSelector } from 'store/selectors/networkSelectors'; +import { getState } from 'store/store'; export const getCleanApiAddress = (customApiAddress?: string) => { - const { network } = networkStore.getState(); + const network = networkSelector(getState()); const apiAddress = customApiAddress ?? network.apiAddress; return apiAddress.endsWith('/') ? apiAddress.slice(0, -1) : apiAddress; }; diff --git a/src/apiCalls/configuration/getNetworkConfigFromApi.ts b/src/apiCalls/configuration/getNetworkConfigFromApi.ts index 827fa24..1ab6649 100644 --- a/src/apiCalls/configuration/getNetworkConfigFromApi.ts +++ b/src/apiCalls/configuration/getNetworkConfigFromApi.ts @@ -1,7 +1,7 @@ import axios from 'axios'; -import { getCleanApiAddress } from 'store/slices/network/actions/getCleanApiAddress'; import { ApiNetworkConfigType } from 'types/network.types'; import { NETWORK_CONFIG_ENDPOINT } from '../endpoints'; +import { getCleanApiAddress } from './getCleanApiAddress'; const urlIsValid = (url: string) => { try { diff --git a/src/index.ts b/src/index.ts index da8bbda..41d6e6f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,6 @@ export * from './core'; export * from './constants'; export * from './apiCalls'; -export * from './store'; export * from './types'; export * from './services'; export * from './utils'; diff --git a/src/store/actions/account/accountActions.ts b/src/store/actions/account/accountActions.ts new file mode 100644 index 0000000..da37b0e --- /dev/null +++ b/src/store/actions/account/accountActions.ts @@ -0,0 +1,62 @@ +import { store } from 'store/store'; +import { AccountType } from 'types/account.types'; +import { emptyAccount } from 'store/slices/account/emptyAccount'; +import { + BatchTransactionsWSResponseType, + LedgerAccountType +} from 'store/slices/account/account.types'; + +export const setAddress = (address: string) => + store.setState(({ account: state }) => { + state.address = address; + }); + +export const setAccount = (account: AccountType) => + store.setState(({ account: state }) => { + const isSameAddress = state.address === account.address; + state.accounts = { + [state.address]: isSameAddress ? account : emptyAccount + }; + }); + +// TODO: check if needed +export const setLedgerAccount = (ledgerAccount: LedgerAccountType | null) => + store.setState(({ account: state }) => { + state.ledgerAccount = ledgerAccount; + }); + +// TODO: check if needed +export const updateLedgerAccount = ({ + index, + address +}: { + index: LedgerAccountType['index']; + address: LedgerAccountType['address']; +}) => + store.setState(({ account: state }) => { + if (state.ledgerAccount) { + state.ledgerAccount.address = address; + state.ledgerAccount.index = index; + } + }); + +export const setWalletConnectAccount = (walletConnectAccount: string | null) => + store.setState(({ account: state }) => { + state.walletConnectAccount = walletConnectAccount; + }); + +export const setWebsocketEvent = (message: string) => + store.setState(({ account: state }) => { + state.websocketEvent = { + timestamp: Date.now(), + message + }; + }); + +export const setWebsocketBatchEvent = (data: BatchTransactionsWSResponseType) => + store.setState(({ account: state }) => { + state.websocketBatchEvent = { + timestamp: Date.now(), + data + }; + }); diff --git a/src/store/actions/account/index.ts b/src/store/actions/account/index.ts new file mode 100644 index 0000000..4c07f56 --- /dev/null +++ b/src/store/actions/account/index.ts @@ -0,0 +1 @@ +export * from './accountActions'; diff --git a/src/store/actions/constants.ts b/src/store/actions/constants.ts deleted file mode 100644 index 7035322..0000000 --- a/src/store/actions/constants.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum SharedActionsEnum { - LOGOUT = 'LOGOUT', - LOGIN = 'LOGIN' -} diff --git a/src/store/actions/index.ts b/src/store/actions/index.ts index fcb0f8e..0e76145 100644 --- a/src/store/actions/index.ts +++ b/src/store/actions/index.ts @@ -1,2 +1,3 @@ -export * from './constants'; +export * from './account'; +export * from './network'; export * from './sharedActions'; diff --git a/src/store/actions/network/index.ts b/src/store/actions/network/index.ts new file mode 100644 index 0000000..f114289 --- /dev/null +++ b/src/store/actions/network/index.ts @@ -0,0 +1 @@ +export * from './networkActions'; diff --git a/src/store/slices/network/actions/initializeNetwork.ts b/src/store/actions/network/initializeNetwork.ts similarity index 77% rename from src/store/slices/network/actions/initializeNetwork.ts rename to src/store/actions/network/initializeNetwork.ts index 08d2943..2862b0f 100644 --- a/src/store/slices/network/actions/initializeNetwork.ts +++ b/src/store/actions/network/initializeNetwork.ts @@ -1,8 +1,8 @@ import { getServerConfiguration } from 'apiCalls/configuration/getServerConfiguration'; import { fallbackNetworkConfigurations } from 'constants/network'; import { EnvironmentsEnum } from 'types/enums.types'; -import { CustomNetworkType } from 'types/network.types'; -import { networkStore } from '../network'; +import { CustomNetworkType, NetworkType } from 'types/network.types'; +import { initializeNetworkConfig } from './networkActions'; export type InitializeNetworkPropsType = { customNetworkConfig?: CustomNetworkType; @@ -12,7 +12,7 @@ export type InitializeNetworkPropsType = { export const initializeNetwork = async ({ customNetworkConfig = {}, environment -}: InitializeNetworkPropsType) => { +}: InitializeNetworkPropsType): Promise => { const fetchConfigFromServer = !customNetworkConfig?.skipFetchFromServer; const customNetworkApiAddress = customNetworkConfig?.apiAddress; const fallbackConfig = fallbackNetworkConfigurations[environment] || {}; @@ -35,10 +35,12 @@ export const initializeNetwork = async ({ ...serverConfig, ...customNetworkConfig }; - networkStore.getState().initializeNetworkConfig(apiConfig); - return; + + initializeNetworkConfig(apiConfig); + return apiConfig; } } - networkStore.getState().initializeNetworkConfig(localConfig); + initializeNetworkConfig(localConfig); + return localConfig; }; diff --git a/src/store/actions/network/networkActions.ts b/src/store/actions/network/networkActions.ts new file mode 100644 index 0000000..e76e57e --- /dev/null +++ b/src/store/actions/network/networkActions.ts @@ -0,0 +1,26 @@ +import { NetworkType } from 'types/network.types'; +import { store } from '../../store'; + +export const initializeNetworkConfig = (newNetwork: NetworkType) => + store.setState(({ network: state }) => { + const walletConnectV2RelayAddress = + newNetwork.walletConnectV2RelayAddresses[ + Math.floor( + Math.random() * newNetwork.walletConnectV2RelayAddresses.length + ) + ]; + const { walletConnectV2RelayAddresses, ...rest } = newNetwork; + + state.network = { + ...state.network, + ...rest, + walletConnectV2RelayAddress + }; + }); + +export const setCustomWalletAddress = (customWalletAddress: string) => + store.setState(({ network: state }) => { + state.network.customWalletAddress = customWalletAddress; + }); + +export { initializeNetwork } from './initializeNetwork'; diff --git a/src/store/actions/sharedActions.ts b/src/store/actions/sharedActions.ts deleted file mode 100644 index aa85620..0000000 --- a/src/store/actions/sharedActions.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { createCustomEvent } from '../helpers/eventHandlers'; -import { SharedActionsEnum } from './constants'; - -export const sharedActions = { - // TODO: Implement the logout function params - logout: () => { - createCustomEvent(SharedActionsEnum.LOGOUT, { message: 'Logged out' }); - } -}; diff --git a/src/store/actions/sharedActions/index.ts b/src/store/actions/sharedActions/index.ts new file mode 100644 index 0000000..a185173 --- /dev/null +++ b/src/store/actions/sharedActions/index.ts @@ -0,0 +1 @@ +export * from './sharedActions'; diff --git a/src/store/actions/sharedActions/sharedActions.ts b/src/store/actions/sharedActions/sharedActions.ts new file mode 100644 index 0000000..db32fc9 --- /dev/null +++ b/src/store/actions/sharedActions/sharedActions.ts @@ -0,0 +1,14 @@ +import { Address } from '@multiversx/sdk-core/out'; +import { initialState as initialAccountState } from 'store/slices/account/accountSlice'; +import { store } from '../../store'; + +export const logout = () => + store.setState((state) => { + state.account = initialAccountState; + }); + +export const login = (address: string) => + store.setState(({ account }) => { + account.address = address; + account.publicKey = new Address(address).hex(); + }); diff --git a/src/store/createBoundedStore.ts b/src/store/createBoundedStore.ts new file mode 100644 index 0000000..87ec626 --- /dev/null +++ b/src/store/createBoundedStore.ts @@ -0,0 +1,17 @@ +import { useStore } from 'zustand'; +import { StoreApi } from 'zustand/vanilla'; + +type ExtractState = S extends { getState: () => infer X } ? X : never; + +/** + * + * @param store + * @returns a hook that can be used to access the store in ReactJS context + * */ +export const createBoundedUseStore = ((store) => (selector) => + useStore(store, selector)) as >( + store: S +) => { + (): ExtractState; + (selector: (state: ExtractState) => T): T; +}; diff --git a/src/store/helpers/eventHandlers.ts b/src/store/helpers/eventHandlers.ts deleted file mode 100644 index 25052fd..0000000 --- a/src/store/helpers/eventHandlers.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { safeWindow } from 'constants/window'; -import { SharedActionsEnum } from 'store/actions'; -import { StateCreator } from 'zustand/vanilla'; - -export function createCustomEvent(eventName: string, eventData: T) { - const event = new CustomEvent(eventName, { detail: eventData }); - safeWindow?.document.dispatchEvent(event); -} - -function listenToCustomEvent( - eventName: string, - callback: (event: CustomEvent) => void -) { - safeWindow?.document.addEventListener(eventName, (evt) => { - callback(evt as CustomEvent); - }); -} - -type ListenToCustomEventType = < - T extends (state: T, options: { detail: K }) => void ->( - w: T -) => StateCreator>; - -export const getListenToEvent = - (action: SharedActionsEnum): ListenToCustomEventType => - (wrapper) => - (_set, get) => { - listenToCustomEvent(action, (event: CustomEvent<{ detail: T }>) => { - wrapper(get(), event.detail); - }); - return {}; - }; diff --git a/src/store/index.ts b/src/store/index.ts deleted file mode 100644 index abf280e..0000000 --- a/src/store/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './actions'; -export * from './slices'; diff --git a/src/store/selectors/accountSelectors.ts b/src/store/selectors/accountSelectors.ts new file mode 100644 index 0000000..72d3ce7 --- /dev/null +++ b/src/store/selectors/accountSelectors.ts @@ -0,0 +1,7 @@ +import { StoreType } from '../store'; + +export const accountSelector = ({ + account: { accounts, address } +}: StoreType) => accounts[address]; + +export const addressSelector = ({ account: { address } }: StoreType) => address; diff --git a/src/store/selectors/hooks/index.ts b/src/store/selectors/hooks/index.ts new file mode 100644 index 0000000..3839340 --- /dev/null +++ b/src/store/selectors/hooks/index.ts @@ -0,0 +1 @@ +export * from './useSelector'; diff --git a/src/store/selectors/hooks/useSelector.ts b/src/store/selectors/hooks/useSelector.ts new file mode 100644 index 0000000..f97048a --- /dev/null +++ b/src/store/selectors/hooks/useSelector.ts @@ -0,0 +1,9 @@ +import { StoreType, useStore } from '../../store'; + +type ExtractState = S extends { getState: () => infer X } ? X : StoreType; + +export const useSelector = ( + selector: (state: ExtractState) => T +) => { + return useStore(selector); +}; diff --git a/src/store/selectors/index.ts b/src/store/selectors/index.ts new file mode 100644 index 0000000..e17560d --- /dev/null +++ b/src/store/selectors/index.ts @@ -0,0 +1,3 @@ +export * from './accountSelectors'; +export * from './networkSelectors'; +export * from './storeSelector'; diff --git a/src/store/selectors/networkSelectors.ts b/src/store/selectors/networkSelectors.ts new file mode 100644 index 0000000..dcb8010 --- /dev/null +++ b/src/store/selectors/networkSelectors.ts @@ -0,0 +1,8 @@ +import { StoreType } from '../store'; + +export const networkSliceSelector = ({ network }: StoreType) => network; + +export const networkSelector = ({ network }: StoreType) => network.network; + +export const chainIdSelector = ({ network: { network } }: StoreType) => + network.chainId; diff --git a/src/store/selectors/storeSelector.ts b/src/store/selectors/storeSelector.ts new file mode 100644 index 0000000..d901d56 --- /dev/null +++ b/src/store/selectors/storeSelector.ts @@ -0,0 +1,3 @@ +import { StoreType } from '../store'; + +export const stateSelector = (state: StoreType) => state; diff --git a/src/store/slices/account/accountSlice.ts b/src/store/slices/account/accountSlice.ts new file mode 100644 index 0000000..10cb692 --- /dev/null +++ b/src/store/slices/account/accountSlice.ts @@ -0,0 +1,25 @@ +import { StateCreator } from 'zustand/vanilla'; +import { DAppStoreState, MutatorsIn } from 'store/store.types'; +import { AccountSliceType } from './account.types'; +import { emptyAccount } from './emptyAccount'; + +export const initialState: AccountSliceType = { + address: '', + websocketEvent: null, + websocketBatchEvent: null, + accounts: { '': emptyAccount }, + ledgerAccount: null, + publicKey: '', + walletConnectAccount: null +}; + +function getAccountSlice(): StateCreator< + DAppStoreState, + MutatorsIn, + [], + AccountSliceType +> { + return () => initialState; +} + +export const accountSlice = getAccountSlice(); diff --git a/src/store/slices/account/index.ts b/src/store/slices/account/index.ts index 362a768..96e1a81 100644 --- a/src/store/slices/account/index.ts +++ b/src/store/slices/account/index.ts @@ -1 +1 @@ -export * from './account'; +export * from './accountSlice'; diff --git a/src/store/slices/helpers/getKeys.ts b/src/store/slices/helpers/getKeys.ts deleted file mode 100644 index 5729686..0000000 --- a/src/store/slices/helpers/getKeys.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function getKeys(obj: T): { [K in keyof T]: K } { - return Object.keys(obj as any).reduce( - (acc, key) => { - acc[key as keyof T] = key as keyof T; - return acc; - }, - {} as { [K in keyof T]: K } - ); -} diff --git a/src/store/slices/helpers/getReactStore.ts b/src/store/slices/helpers/getReactStore.ts deleted file mode 100644 index 966e600..0000000 --- a/src/store/slices/helpers/getReactStore.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { StoreApi, UseBoundStore, create } from 'zustand'; -import { getKeys } from './getKeys'; - -// eslint-disable-next-line @typescript-eslint/ban-types -function callSetFunction( - originalFunction: T, - set: F -) { - return function (this: any, ...args: any[]) { - set.apply(this, args); - return originalFunction.apply(this, args); - }; -} - -export function getReactStore>({ - initialState, - store -}: { - store: S; - initialState: T; -}) { - const keys = getKeys(initialState); - const useStore = create((set) => { - const returnObj: any = {}; - - for (const key in keys) { - const currentKey = keys[key as keyof typeof keys]; - const currentValue = (store as any).getState()[currentKey]; - - returnObj[currentKey] = - typeof currentValue === 'function' - ? callSetFunction(currentValue, set) - : currentValue; - } - - return returnObj as T; - }); - - store.subscribe((newState) => { - useStore.setState(newState); - }); - - return useStore as UseBoundStore>; -} diff --git a/src/store/slices/helpers/types.ts b/src/store/slices/helpers/types.ts deleted file mode 100644 index 40f3698..0000000 --- a/src/store/slices/helpers/types.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type GetSetType = ( - partial: T | Partial | ((state: T) => void), - shouldReplace?: boolean | undefined, - type?: { - type: string; - } -) => void; diff --git a/src/store/slices/index.ts b/src/store/slices/index.ts index d23c2d8..5451f0f 100644 --- a/src/store/slices/index.ts +++ b/src/store/slices/index.ts @@ -1,2 +1,2 @@ -export * from './network'; export * from './account'; +export * from './network'; diff --git a/src/store/slices/network/actions.ts b/src/store/slices/network/actions.ts deleted file mode 100644 index 741834f..0000000 --- a/src/store/slices/network/actions.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { getServerConfiguration } from 'apiCalls/configuration/getServerConfiguration'; -import { fallbackNetworkConfigurations } from 'constants/network'; -import { EnvironmentsEnum } from 'types/enums.types'; -import { CustomNetworkType } from 'types/network.types'; -import { networkStore } from './network'; - -export type InitializeNetworkPropsType = { - customNetworkConfig?: CustomNetworkType; - environment: EnvironmentsEnum; -}; - -export const initializeNetwork = async ({ - customNetworkConfig = {}, - environment -}: InitializeNetworkPropsType) => { - const fetchConfigFromServer = !customNetworkConfig?.skipFetchFromServer; - const customNetworkApiAddress = customNetworkConfig?.apiAddress; - const fallbackConfig = fallbackNetworkConfigurations[environment] || {}; - - const localConfig = { - ...fallbackConfig, - ...customNetworkConfig - }; - - if (fetchConfigFromServer) { - const fallbackApiAddress = fallbackConfig?.apiAddress; - - const serverConfig = await getServerConfiguration( - customNetworkApiAddress || fallbackApiAddress - ); - - if (serverConfig != null) { - const apiConfig = { - ...fallbackConfig, - ...serverConfig, - ...customNetworkConfig - }; - networkStore.getState().initializeNetworkConfig(apiConfig); - return; - } - } - - networkStore.getState().initializeNetworkConfig(localConfig); -}; diff --git a/src/store/slices/network/actions/index.ts b/src/store/slices/network/actions/index.ts deleted file mode 100644 index 55635bd..0000000 --- a/src/store/slices/network/actions/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getCleanApiAddress'; -export * from './initializeNetwork'; diff --git a/src/store/slices/network/index.ts b/src/store/slices/network/index.ts index f5723f2..2dbcb1d 100644 --- a/src/store/slices/network/index.ts +++ b/src/store/slices/network/index.ts @@ -1,2 +1 @@ -export * from './actions'; -export * from './network'; +export * from './networkSlice'; diff --git a/src/store/slices/network/network.ts b/src/store/slices/network/network.ts deleted file mode 100644 index e2b8840..0000000 --- a/src/store/slices/network/network.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { NetworkType } from 'types/network.types'; -import { getActions } from '../helpers'; -import { getKeys } from '../helpers/getKeys'; -import { getReactStore } from '../helpers/getReactStore'; -import { getVanillaStore } from '../helpers/getVanillaStore'; -import { GetSetType } from '../helpers/types'; -import { listenToLogout } from '../shared/listenToLogout'; -import { emptyNetwork } from './emptyNetwork'; -import { NetworkSliceType } from './network.types'; - -const initialData: NetworkSliceType = { - network: emptyNetwork, - customWalletAddress: '' -}; - -const actions = { - initializeNetworkConfig: (_network: NetworkType) => {}, - setCustomWalletAddress: (_customWalletAddress: string) => {} -}; - -const initialState = { - ...initialData, - ...actions -}; - -type StateType = typeof initialState; - -const keys = getKeys(initialState); - -const definition = (set: GetSetType): StateType => { - const createActions = getActions({ set, actions }); - - return { - ...initialData, - ...createActions({ - initializeNetworkConfig: (state, newNetwork) => { - const walletConnectV2RelayAddress = - newNetwork.walletConnectV2RelayAddresses[ - Math.floor( - Math.random() * newNetwork.walletConnectV2RelayAddresses.length - ) - ]; - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { walletConnectV2RelayAddresses, ...rest } = newNetwork; - state[keys.network] = { - ...state[keys.network], - ...rest, - walletConnectV2RelayAddress - }; - }, - setCustomWalletAddress: (state, customWalletAddress) => { - state[keys.network].customWalletAddress = customWalletAddress; - } - }) - }; -}; - -const handleLogout = listenToLogout((state: StateType) => { - state.setCustomWalletAddress(''); -}); - -export const networkStore = getVanillaStore({ - name: 'networkStore', - definition, - middleware: [handleLogout] -}); - -// react store -export const useNetworkStore = getReactStore({ - initialState, - store: networkStore -}); diff --git a/src/store/slices/network/networkSlice.ts b/src/store/slices/network/networkSlice.ts new file mode 100644 index 0000000..d1e8d1c --- /dev/null +++ b/src/store/slices/network/networkSlice.ts @@ -0,0 +1,19 @@ +import { StateCreator } from 'zustand/vanilla'; +import { NetworkSliceType } from './networkSlice.types'; +import { DAppStoreState, MutatorsIn } from 'store/store.types'; +import { emptyNetwork } from './emptyNetwork'; + +const initialState: NetworkSliceType = { + network: emptyNetwork +}; + +function getNetworkSlice(): StateCreator< + DAppStoreState, + MutatorsIn, + [], + NetworkSliceType +> { + return () => initialState; +} + +export const networkSlice = getNetworkSlice(); diff --git a/src/store/slices/network/networkSlice.types.ts b/src/store/slices/network/networkSlice.types.ts new file mode 100644 index 0000000..9ba7606 --- /dev/null +++ b/src/store/slices/network/networkSlice.types.ts @@ -0,0 +1,5 @@ +import { CurrentNetworkType } from 'types/network.types'; + +export interface NetworkSliceType { + network: CurrentNetworkType; +} diff --git a/src/store/slices/shared/listenToLogout.ts b/src/store/slices/shared/listenToLogout.ts deleted file mode 100644 index 1098b03..0000000 --- a/src/store/slices/shared/listenToLogout.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { SharedActionsEnum } from 'store/actions/constants'; -import { getListenToEvent } from 'store/helpers/eventHandlers'; - -export const listenToLogout = getListenToEvent( - SharedActionsEnum.LOGOUT -); diff --git a/src/store/slices/shared/loggerMiddleware.ts b/src/store/slices/shared/loggerMiddleware.ts deleted file mode 100644 index a4f1868..0000000 --- a/src/store/slices/shared/loggerMiddleware.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { StateCreator, StoreApi } from 'zustand'; - -/** - * Creates a logger middleware that logs the state before and after each action - * @example - * // Create a custom event named "myEvent" with an object as data - * const store = createStore()( - devtools( - persist( - immer( - loggerMiddleware((...a) => ({ - ...definition(...a), - ...createSharedSlice(...a) - })) - ), - { - name: 'accountStore', - storage: createJSONStorage(() => sessionStorage) - } - ) - ) - ); - */ -export const loggerMiddleware = - (config: StateCreator) => - ( - set: StoreApi['setState'], - get: StoreApi['getState'], - api: StoreApi - ): S => - config( - (...args) => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const [_state, _shouldReplace, ...rest] = args; - - const [{ type }] = rest as any; - - console.log('running', type, 'and applying', args); - set(...args); - console.log(' new state', get()); - }, - get, - api - ); diff --git a/src/store/store.ts b/src/store/store.ts new file mode 100644 index 0000000..63a0c0e --- /dev/null +++ b/src/store/store.ts @@ -0,0 +1,44 @@ +import { createStore } from 'zustand/vanilla'; +import { createJSONStorage, devtools, persist } from 'zustand/middleware'; +import { immer } from 'zustand/middleware/immer'; +import { networkSlice } from './slices/network/networkSlice'; +import { NetworkSliceType } from './slices/network/networkSlice.types'; +import { AccountSliceType } from './slices/account/account.types'; +import { accountSlice } from './slices/account/accountSlice'; +import { createBoundedUseStore } from './createBoundedStore'; + +export type StoreType = { + network: NetworkSliceType; + account: AccountSliceType; +}; + +export type MutatorsIn = [ + ['zustand/devtools', never], + ['zustand/persist', unknown], + ['zustand/immer', never] +]; + +export type MutatorsOut = [ + ['zustand/devtools', never], + ['zustand/persist', StoreType], + ['zustand/immer', never] +]; + +export const store = createStore( + devtools( + persist( + immer((...args) => ({ + network: networkSlice(...args), + account: accountSlice(...args) + })), + { + name: 'sdk-dapp-store', + storage: createJSONStorage(() => localStorage) + } + ) + ) +); + +export const getState = () => store.getState(); + +export const useStore = createBoundedUseStore(store); diff --git a/src/store/store.types.ts b/src/store/store.types.ts new file mode 100644 index 0000000..7454446 --- /dev/null +++ b/src/store/store.types.ts @@ -0,0 +1,19 @@ +import { AccountSliceType } from './slices/account/account.types'; +import { NetworkSliceType } from './slices/network/networkSlice.types'; + +export type DAppStoreState = { + network: NetworkSliceType; + account: AccountSliceType; +}; + +export type MutatorsIn = [ + ['zustand/devtools', never], + ['zustand/persist', unknown], + ['zustand/immer', never] +]; + +export type MutatorsOut = [ + ['zustand/devtools', never], + ['zustand/persist', DAppStoreState], + ['zustand/immer', never] +]; diff --git a/yarn.lock b/yarn.lock index 38f09ab..2d18b94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,53 +18,75 @@ "@babel/highlight" "^7.24.7" picocolors "^1.0.0" -"@babel/compat-data@^7.25.2": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb" - integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== +"@babel/compat-data@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed" + integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.25.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" - integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4" + integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.25.0" - "@babel/helper-compilation-targets" "^7.25.2" - "@babel/helper-module-transforms" "^7.25.2" - "@babel/helpers" "^7.25.0" - "@babel/parser" "^7.25.0" - "@babel/template" "^7.25.0" - "@babel/traverse" "^7.25.2" - "@babel/types" "^7.25.2" + "@babel/generator" "^7.24.7" + "@babel/helper-compilation-targets" "^7.24.7" + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helpers" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/template" "^7.24.7" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.25.0", "@babel/generator@^7.25.4", "@babel/generator@^7.7.2": - version "7.25.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.5.tgz#b31cf05b3fe8c32d206b6dad03bb0aacbde73450" - integrity sha512-abd43wyLfbWoxC6ahM8xTkqLpGB2iWBVyuKC9/srhFunCd1SDNrV1s72bBpK4hLj8KLzHBBcOblvLQZBNw9r3w== +"@babel/generator@^7.24.7", "@babel/generator@^7.7.2": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" + integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== dependencies: - "@babel/types" "^7.25.4" + "@babel/types" "^7.24.7" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.25.2": - version "7.25.2" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz#e1d9410a90974a3a5a66e84ff55ef62e3c02d06c" - integrity sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw== +"@babel/helper-compilation-targets@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9" + integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== dependencies: - "@babel/compat-data" "^7.25.2" - "@babel/helper-validator-option" "^7.24.8" - browserslist "^4.23.1" + "@babel/compat-data" "^7.24.7" + "@babel/helper-validator-option" "^7.24.7" + browserslist "^4.22.2" lru-cache "^5.1.1" semver "^6.3.1" +"@babel/helper-environment-visitor@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" + integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== + dependencies: + "@babel/types" "^7.24.7" + +"@babel/helper-function-name@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" + integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== + dependencies: + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/helper-hoist-variables@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" + integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-module-imports@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" @@ -73,20 +95,21 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/helper-module-transforms@^7.25.2": - version "7.25.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz#ee713c29768100f2776edf04d4eb23b8d27a66e6" - integrity sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ== +"@babel/helper-module-transforms@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8" + integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== dependencies: + "@babel/helper-environment-visitor" "^7.24.7" "@babel/helper-module-imports" "^7.24.7" "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" "@babel/helper-validator-identifier" "^7.24.7" - "@babel/traverse" "^7.25.2" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.24.8", "@babel/helper-plugin-utils@^7.8.0": - version "7.24.8" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz#94ee67e8ec0e5d44ea7baeb51e571bd26af07878" - integrity sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.8.0": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz#98c84fe6fe3d0d3ae7bfc3a5e166a46844feb2a0" + integrity sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg== "@babel/helper-simple-access@^7.24.7": version "7.24.7" @@ -96,28 +119,35 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/helper-string-parser@^7.24.8": - version "7.24.8" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" - integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== +"@babel/helper-split-export-declaration@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" + integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== + dependencies: + "@babel/types" "^7.24.7" + +"@babel/helper-string-parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" + integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== "@babel/helper-validator-identifier@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== -"@babel/helper-validator-option@^7.24.8": - version "7.24.8" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" - integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== +"@babel/helper-validator-option@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6" + integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== -"@babel/helpers@^7.25.0": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.0.tgz#e69beb7841cb93a6505531ede34f34e6a073650a" - integrity sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw== +"@babel/helpers@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416" + integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== dependencies: - "@babel/template" "^7.25.0" - "@babel/types" "^7.25.0" + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" "@babel/highlight@^7.24.7": version "7.24.7" @@ -129,12 +159,10 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.4": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.4.tgz#af4f2df7d02440286b7de57b1c21acfb2a6f257a" - integrity sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA== - dependencies: - "@babel/types" "^7.25.4" +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" + integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -150,28 +178,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.12.13": +"@babel/plugin-syntax-class-properties@^7.8.3": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== dependencies: "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-syntax-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" - integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-import-attributes@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz#b4f9ea95a79e6912480c4b626739f86a076624ca" - integrity sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A== - dependencies: - "@babel/helper-plugin-utils" "^7.24.7" - -"@babel/plugin-syntax-import-meta@^7.10.4": +"@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== @@ -192,7 +206,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": +"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== @@ -206,7 +220,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.10.4": +"@babel/plugin-syntax-numeric-separator@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== @@ -234,14 +248,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" - integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-top-level-await@^7.14.5": +"@babel/plugin-syntax-top-level-await@^7.8.3": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== @@ -249,40 +256,43 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.4.tgz#04db9ce5a9043d9c635e75ae7969a2cd50ca97ff" - integrity sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg== + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz#58d458271b4d3b6bb27ee6ac9525acbb259bad1c" + integrity sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA== dependencies: - "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/template@^7.25.0", "@babel/template@^7.3.3": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" - integrity sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q== +"@babel/template@^7.24.7", "@babel/template@^7.3.3": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" + integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== dependencies: "@babel/code-frame" "^7.24.7" - "@babel/parser" "^7.25.0" - "@babel/types" "^7.25.0" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" -"@babel/traverse@^7.24.7", "@babel/traverse@^7.25.2": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.4.tgz#648678046990f2957407e3086e97044f13c3e18e" - integrity sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg== +"@babel/traverse@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" + integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== dependencies: "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.25.4" - "@babel/parser" "^7.25.4" - "@babel/template" "^7.25.0" - "@babel/types" "^7.25.4" + "@babel/generator" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-hoist-variables" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.4", "@babel/types@^7.3.3": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.4.tgz#6bcb46c72fdf1012a209d016c07f769e10adcb5f" - integrity sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.3.3": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" + integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== dependencies: - "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-string-parser" "^7.24.7" "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" @@ -414,9 +424,9 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" - integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + version "4.10.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0" + integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== "@eslint/eslintrc@^3.0.2": version "3.1.0" @@ -709,9 +719,9 @@ integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" - integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" @@ -744,9 +754,9 @@ web-encoding "^1.1.5" "@multiversx/sdk-core@>= 13.0.0": - version "13.4.1" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-13.4.1.tgz#9dd4c7b89cc1d6eda31530d79dda297642731e08" - integrity sha512-WjIk7XYVDeDjI7XWnUAqD2L4hHCi+aYyqjew7/rleWymQMJQN9eX35OJsIxbhKO5oz/fc6vBhJrPcyJ/q0Dw3w== + version "13.2.1" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-13.2.1.tgz#ed7cb7048b76d611adb2601ecb58eddb74977228" + integrity sha512-qnC4Q2x+lc7jw5GYja5yvRhqKaJ+2m95txNS6FwLXPb/MxW0ZwRZsAt4qByxOF5hpx6m9v3bJnKFFZn9VrHcNw== dependencies: "@multiversx/sdk-transaction-decoder" "1.0.2" bech32 "1.1.4" @@ -761,11 +771,11 @@ integrity sha512-fl3TdES93Jc4T559BI+QxNRGRUTabb7TiAXHKL9g6mbLD+silK+5euAoDpPBkbZpVFnfsXQssUVuyKBV4Ine6w== "@multiversx/sdk-native-auth-client@^1.0.8": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-native-auth-client/-/sdk-native-auth-client-1.0.9.tgz#24807976a150602e5c691df138056a88d3910e43" - integrity sha512-q1/cDRKz7QQsr8lQskUsfGkqJbIut772/MBX52Td4OTGg/G1HAm2xsELe+06y7L537A2rqz5/W9KkJ5yWt968g== + version "1.0.8" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-native-auth-client/-/sdk-native-auth-client-1.0.8.tgz#160b34b9ce80595008b1d7fdab75cea6347eb907" + integrity sha512-anXcQplVp3/m2rBH4oGQZNIhk0m/J45SomubNMCgSzepJ2PU5E5eQLYletvSDObhTGfRnNCF8edAldkDP9a4Kw== dependencies: - axios "^1.7.4" + axios "^1.6.8" "@multiversx/sdk-transaction-decoder@1.0.2": version "1.0.2" @@ -774,10 +784,10 @@ dependencies: bech32 "^2.0.0" -"@multiversx/sdk-web-wallet-cross-window-provider@>= 0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-0.4.2.tgz#49f6d7f526bd3ed16bb7c9eb85b084d710f2168f" - integrity sha512-0J99FYrMyQ9wzjGJKGc6nim2s4tZGMsmEClU/5lZDkTwgbfJd2LdMX2bm4yMYmBE8uUp/qOIHQOXFMZCW7VDFQ== +"@multiversx/sdk-web-wallet-cross-window-provider@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-0.2.0.tgz#0fab56632b77556349ed04d97bffdee02bc0d3d3" + integrity sha512-HyHKir96e8i3DnwtR1TOwINs9dOJH5kDjMOMjJvpqUlZm/07+O/KrWDxVRCAF7Qxhg0Lm09w6kfkBIoHfdux0w== dependencies: "@types/jest" "^29.5.11" "@types/qs" "6.9.10" @@ -891,74 +901,74 @@ dependencies: "@sinonjs/commons" "^3.0.0" -"@swc/core-darwin-arm64@1.7.18": - version "1.7.18" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.18.tgz#4035e98ea38b2fb5f709b2c7d3d709627dba511e" - integrity sha512-MwLc5U+VGPMZm8MjlFBjEB2wyT1EK0NNJ3tn+ps9fmxdFP+PL8EpMiY1O1F2t1ydy2OzBtZz81sycjM9RieFBg== - -"@swc/core-darwin-x64@1.7.18": - version "1.7.18" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.18.tgz#8e907ed0e87d60b53e6aba54e172933f9db62d26" - integrity sha512-IkukOQUw7/14VkHp446OkYGCZEHqZg9pTmTdBawlUyz2JwZMSn2VodCl7aFSdGCsU4Cwni8zKA8CCgkCCAELhw== - -"@swc/core-linux-arm-gnueabihf@1.7.18": - version "1.7.18" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.18.tgz#0534355885e83e8321e2461db2fc01dda7353033" - integrity sha512-ATnb6jJaBeXCqrTUawWdoOy7eP9SCI7UMcfXlYIMxX4otKKspLPAEuGA5RaNxlCcj9ObyO0J3YGbtZ6hhD2pjg== - -"@swc/core-linux-arm64-gnu@1.7.18": - version "1.7.18" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.18.tgz#99877ae47c9803977c42fe632db04cc10d47a7e9" - integrity sha512-poHtH7zL7lEp9K2inY90lGHJABWxURAOgWNeZqrcR5+jwIe7q5KBisysH09Zf/JNF9+6iNns+U0xgWTNJzBuGA== - -"@swc/core-linux-arm64-musl@1.7.18": - version "1.7.18" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.18.tgz#f41c31598d7ef9ffbf06c3994b7d59085abc01ab" - integrity sha512-qnNI1WmcOV7Wz1ZDyK6WrOlzLvJ01rnni8ec950mMHWkLRMP53QvCvhF3S+7gFplWBwWJTOOPPUqJp/PlSxWyQ== - -"@swc/core-linux-x64-gnu@1.7.18": - version "1.7.18" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.18.tgz#95575b46f3f8fab89bbed51f75eab980c136b0b0" - integrity sha512-x9SCqCLzwtlqtD5At3I1a7Gco+EuXnzrJGoucmkpeQohshHuwa+cskqsXO6u1Dz0jXJEuHbBZB9va1wYYfjgFg== - -"@swc/core-linux-x64-musl@1.7.18": - version "1.7.18" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.18.tgz#5a31f97d05b65e0b2993d00b6ffff8b7f7cd3557" - integrity sha512-qtj8iOpMMgKjzxTv+islmEY0JBsbd93nka0gzcTTmGZxKtL5jSUsYQvkxwNPZr5M9NU1fgaR3n1vE6lFmtY0IQ== - -"@swc/core-win32-arm64-msvc@1.7.18": - version "1.7.18" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.18.tgz#6b227e1f67d9c5ed429177ae7962212029da9087" - integrity sha512-ltX/Ol9+Qu4SXmISCeuwVgAjSa8nzHTymknpozzVMgjXUoZMoz6lcynfKL1nCh5XLgqh0XNHUKLti5YFF8LrrA== - -"@swc/core-win32-ia32-msvc@1.7.18": - version "1.7.18" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.18.tgz#510868ae0a255581acd66d0d52e6a732290902f6" - integrity sha512-RgTcFP3wgyxnQbTCJrlgBJmgpeTXo8t807GU9GxApAXfpLZJ3swJ2GgFUmIJVdLWyffSHF5BEkF3FmF6mtH5AQ== - -"@swc/core-win32-x64-msvc@1.7.18": - version "1.7.18" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.18.tgz#381a04740f7662eb1c3d306184dafd0e2cf9da38" - integrity sha512-XbZ0wAgzR757+DhQcnv60Y/bK9yuWPhDNRQVFFQVRsowvK3+c6EblyfUSytIidpXgyYFzlprq/9A9ZlO/wvDWw== +"@swc/core-darwin-arm64@1.5.28": + version "1.5.28" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.5.28.tgz#b0b5a163c6bb34468f1a2307c040811e73a1b253" + integrity sha512-sP6g63ybzIdOWNDbn51tyHN8EMt7Mb4RMeHQEsXB7wQfDvzhpWB+AbfK6Gs3Q8fwP/pmWIrWW9csKOc1K2Mmkg== + +"@swc/core-darwin-x64@1.5.28": + version "1.5.28" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.5.28.tgz#66829b4c1ab7a0dcb708c5af381b2c5b20c41291" + integrity sha512-Bd/agp/g7QocQG5AuorOzSC78t8OzeN+pCN/QvJj1CvPhvppjJw6e1vAbOR8vO2vvGi2pvtf3polrYQStJtSiA== + +"@swc/core-linux-arm-gnueabihf@1.5.28": + version "1.5.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.5.28.tgz#9f85d568d81928301d633ae2ff19c916d07a2d15" + integrity sha512-Wr3TwPGIveS9/OBWm0r9VAL8wkCR0zQn46J8K01uYCmVhUNK3Muxjs0vQBZaOrGu94mqbj9OXY+gB3W7aDvGdA== + +"@swc/core-linux-arm64-gnu@1.5.28": + version "1.5.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.5.28.tgz#5489cc4f7a1846e783bc85ba017306b235f97764" + integrity sha512-8G1ZwVTuLgTAVTMPD+M97eU6WeiRIlGHwKZ5fiJHPBcz1xqIC7jQcEh7XBkobkYoU5OILotls3gzjRt8CMNyDQ== + +"@swc/core-linux-arm64-musl@1.5.28": + version "1.5.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.5.28.tgz#30894beef4b86fee461d986be2633fa978c03083" + integrity sha512-0Ajdzb5Fzvz+XUbN5ESeHAz9aHHSYiQcm+vmsDi0TtPHmsalfnqEPZmnK0zPALPJPLQP2dDo4hELeDg3/c3xgA== + +"@swc/core-linux-x64-gnu@1.5.28": + version "1.5.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.5.28.tgz#e57aff87b9e28c9f239cdfa071dfb2f1123eefa7" + integrity sha512-ueQ9VejnQUM2Pt+vT0IAKoF4vYBWUP6n1KHGdILpoGe3LuafQrqu7RoyQ15C7/AYii7hAeNhTFdf6gLbg8cjFg== + +"@swc/core-linux-x64-musl@1.5.28": + version "1.5.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.5.28.tgz#d766c396063568a18db250c7783cef7141f86d44" + integrity sha512-G5th8Mg0az8CbY4GQt9/m5hg2Y0kGIwvQBeVACuLQB6q2Y4txzdiTpjmFqUUhEvvl7Klyx1IHvNhfXs3zpt7PA== + +"@swc/core-win32-arm64-msvc@1.5.28": + version "1.5.28" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.5.28.tgz#aebb03f89e00d0381d7586d34374d909525975f1" + integrity sha512-JezwCGavZ7CkNXx4yInI4kpb71L0zxzxA9BFlmnsGKEEjVQcKc3hFpmIzfFVs+eotlBUwDNb0+Yo9m6Cb7lllA== + +"@swc/core-win32-ia32-msvc@1.5.28": + version "1.5.28" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.5.28.tgz#37d2698c51001d129fa7380728673911c90b58bc" + integrity sha512-q8tW5J4RkOkl7vYShnWS//VAb2Ngolfm9WOMaF2GRJUr2Y/Xeb/+cNjdsNOqea2BzW049D5vdP7XPmir3/zUZw== + +"@swc/core-win32-x64-msvc@1.5.28": + version "1.5.28" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.5.28.tgz#57c9f955215e0103fe8a60994bdf256a3b6dc31d" + integrity sha512-jap6EiB3wG1YE1hyhNr9KLPpH4PGm+5tVMfN0l7fgKtV0ikgpcEN/YF94tru+z5m2HovqYW009+Evq9dcVGmpg== "@swc/core@^1.4.17": - version "1.7.18" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.7.18.tgz#d45b26d8feef244d1ea43b4732b3ae46bf96a22e" - integrity sha512-qL9v5N5S38ijmqiQRvCFUUx2vmxWT/JJ2rswElnyaHkOHuVoAFhBB90Ywj4RKjh3R0zOjhEcemENTyF3q3G6WQ== + version "1.5.28" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.5.28.tgz#cba572d6a205cc3efa20b38935cad631d6ba2deb" + integrity sha512-muCdNIqOTURUgYeyyOLYE3ShL8SZO6dw6bhRm6dCvxWzCZOncPc5fB0kjcPXTML+9KJoHL7ks5xg+vsQK+v6ig== dependencies: "@swc/counter" "^0.1.3" - "@swc/types" "^0.1.12" + "@swc/types" "^0.1.8" optionalDependencies: - "@swc/core-darwin-arm64" "1.7.18" - "@swc/core-darwin-x64" "1.7.18" - "@swc/core-linux-arm-gnueabihf" "1.7.18" - "@swc/core-linux-arm64-gnu" "1.7.18" - "@swc/core-linux-arm64-musl" "1.7.18" - "@swc/core-linux-x64-gnu" "1.7.18" - "@swc/core-linux-x64-musl" "1.7.18" - "@swc/core-win32-arm64-msvc" "1.7.18" - "@swc/core-win32-ia32-msvc" "1.7.18" - "@swc/core-win32-x64-msvc" "1.7.18" + "@swc/core-darwin-arm64" "1.5.28" + "@swc/core-darwin-x64" "1.5.28" + "@swc/core-linux-arm-gnueabihf" "1.5.28" + "@swc/core-linux-arm64-gnu" "1.5.28" + "@swc/core-linux-arm64-musl" "1.5.28" + "@swc/core-linux-x64-gnu" "1.5.28" + "@swc/core-linux-x64-musl" "1.5.28" + "@swc/core-win32-arm64-msvc" "1.5.28" + "@swc/core-win32-ia32-msvc" "1.5.28" + "@swc/core-win32-x64-msvc" "1.5.28" "@swc/counter@^0.1.3": version "0.1.3" @@ -974,10 +984,10 @@ "@swc/counter" "^0.1.3" jsonc-parser "^3.2.0" -"@swc/types@^0.1.12": - version "0.1.12" - resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.12.tgz#7f632c06ab4092ce0ebd046ed77ff7557442282f" - integrity sha512-wBJA+SdtkbFhHjTMYH+dEH1y4VpfGdAc2Kw/LK09i9bXd/K6j6PkDcFCEzb6iVfZMkPRrl/q0e3toqTAJdkIVA== +"@swc/types@^0.1.8": + version "0.1.8" + resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.8.tgz#2c81d107c86cfbd0c3a05ecf7bb54c50dfa58a95" + integrity sha512-RNFA3+7OJFNYY78x0FYwi1Ow+iF1eF5WvmfY1nXPOEH4R2p/D4Cr1vzje7dNAI2aLFqpv8Wyz4oKSWqIZArpQA== dependencies: "@swc/counter" "^0.1.3" @@ -1090,9 +1100,9 @@ integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/lodash@^4.17.4": - version "4.17.7" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" - integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== + version "4.17.5" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.5.tgz#e6c29b58e66995d57cd170ce3e2a61926d55ee04" + integrity sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw== "@types/ms@*": version "0.7.34" @@ -1100,11 +1110,11 @@ integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== "@types/node@*", "@types/node@>=13.7.0": - version "22.5.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.0.tgz#10f01fe9465166b4cab72e75f60d8b99d019f958" - integrity sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg== + version "20.14.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.2.tgz#a5f4d2bcb4b6a87bffcaa717718c5a0f208f4a18" + integrity sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q== dependencies: - undici-types "~6.19.2" + undici-types "~5.26.4" "@types/node@20.12.8": version "20.12.8" @@ -1124,9 +1134,9 @@ integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== "@types/set-cookie-parser@^2.4.0": - version "2.4.10" - resolved "https://registry.yarnpkg.com/@types/set-cookie-parser/-/set-cookie-parser-2.4.10.tgz#ad3a807d6d921db9720621ea3374c5d92020bcbc" - integrity sha512-GGmQVGpQWUe5qglJozEjZV/5dyxbOOZ0LHe/lqyWssB88Y4svNfst0uqBVscdDeIKl5Jy5+aPSvy7mI9tYRguw== + version "2.4.7" + resolved "https://registry.yarnpkg.com/@types/set-cookie-parser/-/set-cookie-parser-2.4.7.tgz#4a341ed1d3a922573ee54db70b6f0a6d818290e7" + integrity sha512-+ge/loa0oTozxip6zmhRIk8Z/boU51wl9Q6QdLZcokIGMzY5lFXYy/x7Htj2HTC6/KZP1hUbZ1ekx8DYXICvWg== dependencies: "@types/node" "*" @@ -1146,9 +1156,9 @@ integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== "@types/yargs@^17.0.8": - version "17.0.33" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" - integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== + version "17.0.32" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" + integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== dependencies: "@types/yargs-parser" "*" @@ -1267,16 +1277,14 @@ acorn-jsx@^5.3.2: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.0.2: - version "8.3.3" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" - integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== - dependencies: - acorn "^8.11.0" + version "8.3.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== -acorn@^8.1.0, acorn@^8.11.0, acorn@^8.12.0, acorn@^8.8.1: - version "8.12.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" - integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== +acorn@^8.1.0, acorn@^8.11.3, acorn@^8.8.1: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== agent-base@6: version "6.0.2" @@ -1452,10 +1460,10 @@ axios-mock-adapter@^1.22.0: fast-deep-equal "^3.1.3" is-buffer "^2.0.5" -axios@>=1.6.5, axios@^1.7.4: - version "1.7.5" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.5.tgz#21eed340eb5daf47d29b6e002424b3e88c8c54b1" - integrity sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw== +axios@>=1.6.5, axios@^1.6.8: + version "1.7.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621" + integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -1496,25 +1504,22 @@ babel-plugin-jest-hoist@^29.6.3: "@types/babel__traverse" "^7.0.6" babel-preset-current-node-syntax@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz#9a929eafece419612ef4ae4f60b1862ebad8ef30" - integrity sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw== + version "1.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-import-attributes" "^7.24.7" - "@babel/plugin-syntax-import-meta" "^7.10.4" + "@babel/plugin-syntax-class-properties" "^7.8.3" + "@babel/plugin-syntax-import-meta" "^7.8.3" "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-numeric-separator" "^7.8.3" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.8.3" babel-preset-jest@^29.6.3: version "29.6.3" @@ -1600,15 +1605,15 @@ braces@^3.0.3, braces@~3.0.2: dependencies: fill-range "^7.1.1" -browserslist@^4.23.1: - version "4.23.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" - integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== +browserslist@^4.22.2: + version "4.23.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" + integrity sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw== dependencies: - caniuse-lite "^1.0.30001646" - electron-to-chromium "^1.5.4" - node-releases "^2.0.18" - update-browserslist-db "^1.1.0" + caniuse-lite "^1.0.30001629" + electron-to-chromium "^1.4.796" + node-releases "^2.0.14" + update-browserslist-db "^1.0.16" bs-logger@0.x: version "0.2.6" @@ -1671,10 +1676,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001646: - version "1.0.30001653" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz#b8af452f8f33b1c77f122780a4aecebea0caca56" - integrity sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw== +caniuse-lite@^1.0.30001629: + version "1.0.30001632" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz#964207b7cba5851701afb4c8afaf1448db3884b6" + integrity sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg== chalk@^2.4.2: version "2.4.2" @@ -1724,9 +1729,9 @@ ci-info@^3.2.0: integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== cjs-module-lexer@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.0.tgz#677de7ed7efff67cc40c9bf1897fea79d41b5215" - integrity sha512-N1NGmowPlGBLsOZLPvm48StN04V4YvQRL0i6b7ctrVY3epjP/ct7hFLOItz6pDIvRjwpfPxi52a2UWV2ziir8g== + version "1.3.1" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c" + integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== cli-cursor@^3.1.0: version "3.1.0" @@ -1896,9 +1901,9 @@ data-view-byte-offset@^1.0.0: is-data-view "^1.0.1" debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" - integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== dependencies: ms "2.1.2" @@ -1990,10 +1995,10 @@ domexception@^4.0.0: dependencies: webidl-conversions "^7.0.0" -electron-to-chromium@^1.5.4: - version "1.5.13" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" - integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== +electron-to-chromium@^1.4.796: + version "1.4.798" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.798.tgz#6a3fcab2edc1e66e3883466f6b4b8944323c0164" + integrity sha512-by9J2CiM9KPGj9qfp5U4FcPSbXJG7FNzqnYaY4WLzX+v2PHieVGmnsA4dxfpGE3QEC7JofpPZmn7Vn1B9NR2+Q== emittery@^0.13.1: version "0.13.1" @@ -2006,9 +2011,9 @@ emoji-regex@^8.0.0: integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== enhanced-resolve@^5.12.0: - version "5.17.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" - integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + version "5.17.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz#d037603789dd9555b89aaec7eb78845c49089bc5" + integrity sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -2214,9 +2219,9 @@ eslint-import-resolver-typescript@3.6.1: is-glob "^4.0.3" eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: - version "2.8.2" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.2.tgz#2ecad69d71e1fa81f17f7f24d5d3e46b168de663" - integrity sha512-3XnC5fDyc8M4J2E8pt8pmSVRX2M+5yWMCfI/kDZwauQeFgzQOuhcRBFKjTeJagqgk4sFKxe1mvNVnaWwImx/Tg== + version "2.8.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz#52f2404300c3bd33deece9d7372fb337cc1d7c34" + integrity sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q== dependencies: debug "^3.2.7" @@ -2277,9 +2282,9 @@ eslint-plugin-promise@6.1.1: integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig== eslint-scope@^8.0.1: - version "8.0.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.2.tgz#5cbb33d4384c9136083a71190d548158fe128f94" - integrity sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA== + version "8.0.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.1.tgz#a9601e4b81a0b9171657c343fb13111688963cfc" + integrity sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -2347,11 +2352,11 @@ eslint@9.1.1: text-table "^0.2.0" espree@^10.0.1: - version "10.1.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-10.1.0.tgz#8788dae611574c0f070691f522e4116c5a11fc56" - integrity sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA== + version "10.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.0.1.tgz#600e60404157412751ba4a6f3a2ee1a42433139f" + integrity sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww== dependencies: - acorn "^8.12.0" + acorn "^8.11.3" acorn-jsx "^5.3.2" eslint-visitor-keys "^4.0.0" @@ -2361,9 +2366,9 @@ esprima@^4.0.0, esprima@^4.0.1: integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.4.2: - version "1.6.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" - integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" @@ -2537,9 +2542,9 @@ for-each@^0.3.3: is-callable "^1.1.3" foreground-child@^3.1.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" - integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== + version "3.1.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" + integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== dependencies: cross-spawn "^7.0.0" signal-exit "^4.0.1" @@ -2624,9 +2629,9 @@ get-symbol-description@^1.0.2: get-intrinsic "^1.2.4" get-tsconfig@^4.5.0: - version "4.7.6" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.6.tgz#118fd5b7b9bae234cc7705a00cd771d7eb65d62a" - integrity sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA== + version "4.7.5" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.5.tgz#5e012498579e9a6947511ed0cd403272c7acbbaf" + integrity sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw== dependencies: resolve-pkg-maps "^1.0.0" @@ -2645,15 +2650,14 @@ glob-parent@^6.0.2: is-glob "^4.0.3" glob@^10.3.14, glob@^10.3.7: - version "10.4.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" - integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + version "10.4.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.1.tgz#0cfb01ab6a6b438177bfe6a58e2576f6efe909c2" + integrity sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw== dependencies: foreground-child "^3.1.0" jackspeak "^3.1.2" minimatch "^9.0.4" minipass "^7.1.2" - package-json-from-dist "^1.0.0" path-scurry "^1.11.1" glob@^7.1.3, glob@^7.1.4: @@ -2716,9 +2720,9 @@ graphemer@^1.4.0: integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== "graphql@^15.0.0 || ^16.0.0": - version "16.9.0" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.9.0.tgz#1c310e63f16a49ce1fbb230bd0a000e99f6f115f" - integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== + version "16.8.1" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" + integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" @@ -2825,9 +2829,9 @@ ieee754@^1.1.13, ieee754@^1.2.1: integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== ignore@^5.1.1, ignore@^5.2.0, ignore@^5.3.1: - version "5.3.2" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" - integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== immer@^10.1.1: version "10.1.1" @@ -2843,9 +2847,9 @@ import-fresh@^3.2.1: resolve-from "^4.0.0" import-local@^3.0.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" - integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== dependencies: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" @@ -2952,11 +2956,11 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.13.1: - version "2.15.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" - integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== dependencies: - hasown "^2.0.2" + hasown "^2.0.0" is-data-view@^1.0.1: version "1.0.1" @@ -3126,9 +3130,9 @@ istanbul-lib-instrument@^5.0.4: semver "^6.3.0" istanbul-lib-instrument@^6.0.0: - version "6.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" - integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== + version "6.0.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz#91655936cf7380e4e473383081e38478b69993b1" + integrity sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw== dependencies: "@babel/core" "^7.23.9" "@babel/parser" "^7.23.9" @@ -3163,9 +3167,9 @@ istanbul-reports@^3.1.3: istanbul-lib-report "^3.0.0" jackspeak@^3.1.2: - version "3.4.3" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" - integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== + version "3.4.0" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.0.tgz#a75763ff36ad778ede6a156d8ee8b124de445b4a" + integrity sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw== dependencies: "@isaacs/cliui" "^8.0.2" optionalDependencies: @@ -3645,9 +3649,9 @@ json5@^2.2.3: integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== jsonc-parser@^3.2.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" - integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== + version "3.2.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" + integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== keccak@3.0.2: version "3.0.2" @@ -3738,9 +3742,9 @@ loose-envify@^1.1.0: js-tokens "^3.0.0 || ^4.0.0" lru-cache@^10.2.0: - version "10.4.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" - integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== + version "10.2.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" + integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== lru-cache@^5.1.1: version "5.1.1" @@ -3779,9 +3783,9 @@ merge2@^1.3.0, merge2@^1.4.1: integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4: - version "4.0.8" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" - integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + version "4.0.7" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" + integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== dependencies: braces "^3.0.3" picomatch "^2.3.1" @@ -3811,9 +3815,9 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: brace-expansion "^1.1.7" minimatch@^9.0.4: - version "9.0.5" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" - integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + version "9.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" + integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== dependencies: brace-expansion "^2.0.1" @@ -3904,10 +3908,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.18: - version "2.0.18" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" - integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -3922,14 +3926,14 @@ npm-run-path@^4.0.1: path-key "^3.0.0" nwsapi@^2.2.2: - version "2.2.12" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.12.tgz#fb6af5c0ec35b27b4581eb3bbad34ec9e5c696f8" - integrity sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w== + version "2.2.10" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.10.tgz#0b77a68e21a0b483db70b11fad055906e867cda8" + integrity sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ== object-inspect@^1.13.1: - version "1.13.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" - integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== object-keys@^1.1.1: version "1.1.1" @@ -4021,9 +4025,9 @@ os-tmpdir@~1.0.2: integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== outvariant@^1.2.1, outvariant@^1.4.0: - version "1.4.3" - resolved "https://registry.yarnpkg.com/outvariant/-/outvariant-1.4.3.tgz#221c1bfc093e8fec7075497e7799fdbf43d14873" - integrity sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA== + version "1.4.2" + resolved "https://registry.yarnpkg.com/outvariant/-/outvariant-1.4.2.tgz#f54f19240eeb7f15b28263d5147405752d8e2066" + integrity sha512-Ou3dJ6bA/UJ5GVHxah4LnqDwZRwAmWxrG3wtrHrbGnP4RnLCtA64A4F+ae7Y8ww660JaddSoArUR5HjipWSHAQ== p-limit@^2.2.0: version "2.3.0" @@ -4058,11 +4062,6 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -package-json-from-dist@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" - integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -4194,9 +4193,9 @@ prompts@^2.0.1: sisteransi "^1.0.5" protobufjs@^7.3.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.4.0.tgz#7efe324ce9b3b61c82aae5de810d287bc08a248a" - integrity sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw== + version "7.3.0" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.3.0.tgz#a32ec0422c039798c41a0700306a6e305b9cb32c" + integrity sha512-YWD03n3shzV9ImZRX3ccbjqLxj7NokGN0V/ESiBV5xWqrommYHYiihuIyavq03pWSGqlyvYUFmfoMKd+1rPA/g== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -4356,9 +4355,9 @@ reusify@^1.0.4: integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rimraf@^5.0.6: - version "5.0.10" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.10.tgz#23b9843d3dc92db71f96e1a2ce92e39fd2a8221c" - integrity sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ== + version "5.0.7" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.7.tgz#27bddf202e7d89cb2e0381656380d1734a854a74" + integrity sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg== dependencies: glob "^10.3.7" @@ -4423,14 +4422,14 @@ semver@^6.1.0, semver@^6.3.0, semver@^6.3.1: integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: - version "7.6.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" - integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + version "7.6.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== set-cookie-parser@^2.4.6: - version "2.7.0" - resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.7.0.tgz#ef5552b56dc01baae102acb5fc9fb8cd060c30f9" - integrity sha512-lXLOiqpkUumhRdFF3k1osNXCy9akgx/dyPZ5p8qAg9seJzXr5ZrlqZuWIMuY6ejOsVLE6flJ5/h3lsn57fQ/PQ== + version "2.6.0" + resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz#131921e50f62ff1a66a461d7d62d7b21d5d15a51" + integrity sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ== set-function-length@^1.2.1: version "1.2.2" @@ -4786,9 +4785,9 @@ tsconfig-paths@^3.15.0: strip-bom "^3.0.0" tslib@^2.1.0, tslib@^2.6.2: - version "2.7.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" - integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" @@ -4857,9 +4856,9 @@ typed-array-length@^1.0.6: possible-typed-array-names "^1.0.0" typescript@^5.4.5: - version "5.5.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" - integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== unbox-primitive@^1.0.2: version "1.0.2" @@ -4876,20 +4875,15 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici-types@~6.19.2: - version "6.19.8" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" - integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== - universalify@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== -update-browserslist-db@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" - integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== +update-browserslist-db@^1.0.16: + version "1.0.16" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" + integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== dependencies: escalade "^3.1.2" picocolors "^1.0.1" @@ -4909,10 +4903,10 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" -use-sync-external-store@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz#c3b6390f3a30eba13200d2302dcdf1e7b57b2ef9" - integrity sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw== +use-sync-external-store@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" + integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== util-deprecate@^1.0.1: version "1.0.2" @@ -4931,9 +4925,9 @@ util@^0.12.3: which-typed-array "^1.1.2" v8-to-istanbul@^9.0.1: - version "9.3.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" - integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== + version "9.2.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" + integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== dependencies: "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" @@ -5087,9 +5081,9 @@ write-file-atomic@^4.0.2: signal-exit "^3.0.7" ws@^8.11.0: - version "8.18.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" - integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + version "8.17.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" + integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== xml-name-validator@^4.0.0: version "4.0.0" @@ -5135,8 +5129,8 @@ yocto-queue@^0.1.0: integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== zustand@^4.4.7: - version "4.5.5" - resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.5.tgz#f8c713041543715ec81a2adda0610e1dc82d4ad1" - integrity sha512-+0PALYNJNgK6hldkgDq2vLrw5f6g/jCInz52n9RTpropGgeAf/ioFUCdtsjCqu4gNhW9D01rUQBROoRjdzyn2Q== + version "4.5.2" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.2.tgz#fddbe7cac1e71d45413b3682cdb47b48034c3848" + integrity sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g== dependencies: - use-sync-external-store "1.2.2" + use-sync-external-store "1.2.0" From 4d6b1f2f6ec8041591368681e67fa5d08b202878 Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Fri, 12 Jul 2024 12:57:57 +0300 Subject: [PATCH 02/17] fix selectors in NextJS --- src/store/selectors/hooks/useSelector.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/store/selectors/hooks/useSelector.ts b/src/store/selectors/hooks/useSelector.ts index f97048a..8b0db73 100644 --- a/src/store/selectors/hooks/useSelector.ts +++ b/src/store/selectors/hooks/useSelector.ts @@ -2,8 +2,6 @@ import { StoreType, useStore } from '../../store'; type ExtractState = S extends { getState: () => infer X } ? X : StoreType; -export const useSelector = ( - selector: (state: ExtractState) => T -) => { +export function useSelector(selector: (state: ExtractState) => T) { return useStore(selector); -}; +} \ No newline at end of file From 07fde704833168e3da30f182da7d9acaa8b11334 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Tue, 16 Jul 2024 14:14:23 +0300 Subject: [PATCH 03/17] Web-Wallet cross-window login (#7) login with web wallet working --- package.json | 9 +- src/__mocks__/accountConfig.ts | 2 +- src/apiCalls/accounts/getAccountFromApi.ts | 25 + src/apiCalls/accounts/index.ts | 1 + .../configuration/getNetworkConfigFromApi.ts | 2 +- src/apiCalls/utils/axiosFetcher.ts | 4 + src/apiCalls/utils/axiosInstance.ts | 99 ++ src/apiCalls/utils/getCleanApiAddress.ts | 8 + src/apiCalls/utils/getScamAddressData.ts | 18 + src/apiCalls/utils/index.ts | 4 + src/constants/browser.constants.ts | 10 + src/constants/errorMessages.constants.ts | 13 + src/constants/index.ts | 11 +- src/constants/ledger.constants.ts | 1 + .../{network.ts => network.constants.ts} | 0 src/constants/placeholders.constants.ts | 8 + .../{storage.ts => storage.constants.ts} | 2 +- .../{window.ts => window.constants.ts} | 0 src/core/methods/account/getAccount.ts | 6 + src/core/methods/account/getAddress.ts | 6 + src/core/methods/account/getIsLoggedIn.ts | 5 + .../methods/login/helpers/getLoginService.ts | 141 ++ .../login/helpers/getModifiedLoginToken.ts | 43 + .../login/helpers/processModifiedAccount.ts | 52 + .../tests/getModifiedLoginToken.test.ts | 45 + src/core/methods/login/webWalletLogin.ts | 118 ++ src/core/providers/accountProvider.ts | 17 + src/core/providers/helpers/emptyProvider.ts | 111 ++ .../helpers/getLedgerConfiguration.ts | 18 + src/core/providers/helpers/utils.ts | 34 + src/core/providers/index.ts | 2 + .../nativeAuth/methods/getNativeAuthConfig.ts | 2 +- src/services/nativeAuth/nativeAuth.ts | 3 +- .../actions/loginInfo/loginInfoActions.ts | 52 + .../actions/network/initializeNetwork.ts | 2 +- .../actions/sharedActions/sharedActions.ts | 20 +- src/store/selectors/accountSelectors.ts | 5 +- src/store/selectors/hooks/useSelector.ts | 9 +- src/store/selectors/index.ts | 1 + src/store/selectors/loginInfoSelectors.ts | 6 + src/store/selectors/networkSelectors.ts | 2 +- src/store/selectors/storeSelector.ts | 2 +- src/store/slices/account/accountSlice.ts | 4 +- src/store/slices/loginInfo/index.ts | 1 + src/store/slices/loginInfo/loginInfo.types.ts | 31 + src/store/slices/loginInfo/loginInfoSlice.ts | 26 + src/store/slices/network/networkSlice.ts | 4 +- src/store/store.ts | 12 +- src/store/store.types.ts | 6 +- src/types/dappProvider.types.ts | 32 + src/types/index.ts | 2 + src/types/login.types.ts | 19 + src/types/misc.types.ts | 1 + src/types/nativeAuth.types.ts | 17 + src/utils/account/getAccount.ts | 3 + src/utils/account/getLatestNonce.ts | 13 + src/utils/account/index.ts | 2 + src/utils/index.ts | 1 + .../__mocks__/sdkWalletconnectProvider.ts | 17 + .../__sdkWalletconnectProvider.ts | 22 + yarn.lock | 1427 ++++++++++++++++- 61 files changed, 2513 insertions(+), 46 deletions(-) create mode 100644 src/apiCalls/accounts/getAccountFromApi.ts create mode 100644 src/apiCalls/accounts/index.ts create mode 100644 src/apiCalls/utils/axiosFetcher.ts create mode 100644 src/apiCalls/utils/axiosInstance.ts create mode 100644 src/apiCalls/utils/getCleanApiAddress.ts create mode 100644 src/apiCalls/utils/getScamAddressData.ts create mode 100644 src/apiCalls/utils/index.ts create mode 100644 src/constants/browser.constants.ts create mode 100644 src/constants/errorMessages.constants.ts create mode 100644 src/constants/ledger.constants.ts rename src/constants/{network.ts => network.constants.ts} (100%) create mode 100644 src/constants/placeholders.constants.ts rename src/constants/{storage.ts => storage.constants.ts} (87%) rename src/constants/{window.ts => window.constants.ts} (100%) create mode 100644 src/core/methods/account/getAccount.ts create mode 100644 src/core/methods/account/getAddress.ts create mode 100644 src/core/methods/account/getIsLoggedIn.ts create mode 100644 src/core/methods/login/helpers/getLoginService.ts create mode 100644 src/core/methods/login/helpers/getModifiedLoginToken.ts create mode 100644 src/core/methods/login/helpers/processModifiedAccount.ts create mode 100644 src/core/methods/login/helpers/tests/getModifiedLoginToken.test.ts create mode 100644 src/core/methods/login/webWalletLogin.ts create mode 100644 src/core/providers/accountProvider.ts create mode 100644 src/core/providers/helpers/emptyProvider.ts create mode 100644 src/core/providers/helpers/getLedgerConfiguration.ts create mode 100644 src/core/providers/helpers/utils.ts create mode 100644 src/core/providers/index.ts create mode 100644 src/store/actions/loginInfo/loginInfoActions.ts create mode 100644 src/store/selectors/loginInfoSelectors.ts create mode 100644 src/store/slices/loginInfo/index.ts create mode 100644 src/store/slices/loginInfo/loginInfo.types.ts create mode 100644 src/store/slices/loginInfo/loginInfoSlice.ts create mode 100644 src/types/dappProvider.types.ts create mode 100644 src/types/login.types.ts create mode 100644 src/types/misc.types.ts create mode 100644 src/types/nativeAuth.types.ts create mode 100644 src/utils/account/getAccount.ts create mode 100644 src/utils/account/getLatestNonce.ts create mode 100644 src/utils/account/index.ts create mode 100644 src/utils/walletconnect/__mocks__/sdkWalletconnectProvider.ts create mode 100644 src/utils/walletconnect/__sdkWalletconnectProvider.ts diff --git a/package.json b/package.json index eccb038..311ada7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-dapp-core", - "version": "0.0.0-alpha.1", + "version": "0.0.0-alpha.2", "main": "out/index.js", "module": "out/index.js", "types": "out/index.d.ts", @@ -30,8 +30,15 @@ "access": "public" }, "dependencies": { + "@lifeomic/axios-fetch": "3.0.1", + "@multiversx/sdk-extension-provider": "3.0.0", + "@multiversx/sdk-hw-provider": "6.4.0", + "@multiversx/sdk-metamask-provider": "0.0.5", "@multiversx/sdk-native-auth-client": "^1.0.8", + "@multiversx/sdk-opera-provider": "1.0.0-alpha.1", + "@multiversx/sdk-wallet-connect-provider": "4.1.2", "@multiversx/sdk-web-wallet-cross-window-provider": "0.2.0", + "@multiversx/sdk-web-wallet-provider": "3.2.1", "@types/lodash": "^4.17.4", "isomorphic-fetch": "^3.0.0", "lodash": "^4.17.21", diff --git a/src/__mocks__/accountConfig.ts b/src/__mocks__/accountConfig.ts index 88dbf16..d363715 100644 --- a/src/__mocks__/accountConfig.ts +++ b/src/__mocks__/accountConfig.ts @@ -1,4 +1,4 @@ -import { fallbackNetworkConfigurations } from 'constants/network'; +import { fallbackNetworkConfigurations } from 'constants/network.constants'; import { EnvironmentsEnum } from 'types'; export const testAddress = diff --git a/src/apiCalls/accounts/getAccountFromApi.ts b/src/apiCalls/accounts/getAccountFromApi.ts new file mode 100644 index 0000000..1cb8f10 --- /dev/null +++ b/src/apiCalls/accounts/getAccountFromApi.ts @@ -0,0 +1,25 @@ +import { ACCOUNTS_ENDPOINT } from 'apiCalls/endpoints'; +import { axiosInstance } from 'apiCalls/utils/axiosInstance'; +import { getCleanApiAddress } from 'apiCalls/utils/getCleanApiAddress'; + +export const accountFetcher = (address: string | null) => { + const apiAddress = getCleanApiAddress(); + const url = `${apiAddress}/${ACCOUNTS_ENDPOINT}/${address}?withGuardianInfo=true`; + // we need to get it with an axios instance because of cross-window user interaction issues + return axiosInstance.get(url); +}; + +export const getAccountFromApi = async (address?: string) => { + if (!address) { + return null; + } + + try { + const { data } = await accountFetcher(address); + return data; + } catch (err) { + console.error('error fetching configuration for ', address); + } + + return null; +}; diff --git a/src/apiCalls/accounts/index.ts b/src/apiCalls/accounts/index.ts new file mode 100644 index 0000000..02c1b32 --- /dev/null +++ b/src/apiCalls/accounts/index.ts @@ -0,0 +1 @@ +export * from './getAccountFromApi'; diff --git a/src/apiCalls/configuration/getNetworkConfigFromApi.ts b/src/apiCalls/configuration/getNetworkConfigFromApi.ts index 1ab6649..85b831f 100644 --- a/src/apiCalls/configuration/getNetworkConfigFromApi.ts +++ b/src/apiCalls/configuration/getNetworkConfigFromApi.ts @@ -1,7 +1,7 @@ import axios from 'axios'; import { ApiNetworkConfigType } from 'types/network.types'; import { NETWORK_CONFIG_ENDPOINT } from '../endpoints'; -import { getCleanApiAddress } from './getCleanApiAddress'; +import { getCleanApiAddress } from '../utils/getCleanApiAddress'; const urlIsValid = (url: string) => { try { diff --git a/src/apiCalls/utils/axiosFetcher.ts b/src/apiCalls/utils/axiosFetcher.ts new file mode 100644 index 0000000..66652e9 --- /dev/null +++ b/src/apiCalls/utils/axiosFetcher.ts @@ -0,0 +1,4 @@ +import { axiosInstance } from 'apiCalls/utils/axiosInstance'; + +export const axiosFetcher = (url: string) => + axiosInstance.get(url).then((response) => response.data); diff --git a/src/apiCalls/utils/axiosInstance.ts b/src/apiCalls/utils/axiosInstance.ts new file mode 100644 index 0000000..135c096 --- /dev/null +++ b/src/apiCalls/utils/axiosInstance.ts @@ -0,0 +1,99 @@ +import { buildAxiosFetch } from '@lifeomic/axios-fetch'; +import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; + +// Needs to be used beacause an async call made after cross-window user interaction makes the dapp unresponsive + +const fetch = buildAxiosFetch(axios); + +const getFormattedAxiosResponse = async (response: Response, config?: T) => { + if (!response.ok) { + throw new Error(`HTTP error! Status: ${response.status}`); + } + + // Clone the response to be able to read it twice (for status and data) + const clonedResponse = response.clone(); + + // Parse the JSON body asynchronously + const jsonPromise = clonedResponse.json(); + + // Return the standardized response object + const [responseData] = await Promise.all([jsonPromise]); + return { + data: responseData, + status: response.status, + statusText: response.statusText, + headers: response.headers, + config + }; +}; + +async function customPost, D = any>( + url: string, + data?: D, + config?: AxiosRequestConfig | undefined +): Promise { + try { + const response = await fetch(url, { + method: 'POST', + body: data ? JSON.stringify(data) : undefined, + headers: { + 'Content-Type': 'application/json', + ...(config?.headers || {}) + }, + ...config + } as RequestInit); + + return getFormattedAxiosResponse(response, config) as unknown as Promise; + } catch (error) { + console.error('Fetch Error:', error); + throw error; + } +} + +async function customGet, D = any>( + url: string, + config?: AxiosRequestConfig | undefined +): Promise { + try { + const response = await fetch(url, config as RequestInit); + if (!response.ok) { + throw new Error(`HTTP error! Status: ${response.status}`); + } + + return getFormattedAxiosResponse(response, config) as unknown as Promise; + } catch (error) { + console.error('Fetch Error:', error); + throw error; + } +} + +async function customPatch, D = any>( + url: string, + data?: D, + config?: AxiosRequestConfig | undefined +): Promise { + try { + const response = await fetch(url, { + method: 'PATCH', + body: data ? JSON.stringify(data) : undefined, + headers: config?.headers || {}, + ...config + } as RequestInit); + + if (!response.ok) { + throw new Error(`HTTP error! Status: ${response.status}`); + } + + return getFormattedAxiosResponse(response, config) as unknown as Promise; + } catch (error) { + console.error('Fetch Error:', error); + throw error; + } +} + +const axiosInstance = axios.create(); +axiosInstance.get = customGet; +axiosInstance.post = customPost; +axiosInstance.patch = customPatch; + +export { axiosInstance }; diff --git a/src/apiCalls/utils/getCleanApiAddress.ts b/src/apiCalls/utils/getCleanApiAddress.ts new file mode 100644 index 0000000..bf5018b --- /dev/null +++ b/src/apiCalls/utils/getCleanApiAddress.ts @@ -0,0 +1,8 @@ +import { networkSelector } from 'store/selectors/networkSelectors'; +import { getState } from 'store/store'; + +export const getCleanApiAddress = (customApiAddress?: string) => { + const network = networkSelector(getState()); + const apiAddress = customApiAddress ?? network.apiAddress; + return apiAddress.endsWith('/') ? apiAddress.slice(0, -1) : apiAddress; +}; diff --git a/src/apiCalls/utils/getScamAddressData.ts b/src/apiCalls/utils/getScamAddressData.ts new file mode 100644 index 0000000..8e1779b --- /dev/null +++ b/src/apiCalls/utils/getScamAddressData.ts @@ -0,0 +1,18 @@ +import axios from 'axios'; +import { ScamInfoType } from 'types/account.types'; +import { ACCOUNTS_ENDPOINT } from '../endpoints'; +import { networkSelector } from 'store/selectors'; +import { getState } from 'store/store'; + +export async function getScamAddressData(addressToVerify: string) { + const { apiAddress, apiTimeout } = networkSelector(getState()); + + const { data } = await axios.get<{ + scamInfo?: ScamInfoType; + code?: string; + }>(`${apiAddress}/${ACCOUNTS_ENDPOINT}/${addressToVerify}`, { + timeout: Number(apiTimeout) + }); + + return data; +} diff --git a/src/apiCalls/utils/index.ts b/src/apiCalls/utils/index.ts new file mode 100644 index 0000000..16d5f3d --- /dev/null +++ b/src/apiCalls/utils/index.ts @@ -0,0 +1,4 @@ +export * from './axiosFetcher'; +export * from './axiosInstance'; +export * from './getCleanApiAddress'; +export * from './getScamAddressData'; diff --git a/src/constants/browser.constants.ts b/src/constants/browser.constants.ts new file mode 100644 index 0000000..311feb3 --- /dev/null +++ b/src/constants/browser.constants.ts @@ -0,0 +1,10 @@ +import { safeWindow } from './window.constants'; + +const userAgent = String(safeWindow?.navigator?.userAgent); + +export const isSafari = /^((?!chrome|android).)*safari/i.test(userAgent); + +const isFirefoxOnWindows = + /firefox/i.test(userAgent) && /windows/i.test(userAgent); + +export const isBrowserWithPopupConfirmation = isSafari || isFirefoxOnWindows; diff --git a/src/constants/errorMessages.constants.ts b/src/constants/errorMessages.constants.ts new file mode 100644 index 0000000..3214906 --- /dev/null +++ b/src/constants/errorMessages.constants.ts @@ -0,0 +1,13 @@ +export const ERROR_SIGNING = 'error when signing'; +export const CANCELLED = 'cancelled'; +export const TRANSACTION_CANCELLED = 'Transaction canceled'; +export const ERROR_SIGNING_TX = 'error signing transaction'; +export const PROVIDER_NOT_INITIALIZED = 'provider not initialized'; +export const MISSING_PROVIDER_MESSAGE = + 'You need a signer/valid signer to send a transaction,use either WalletProvider, LedgerProvider or WalletConnect'; +export const DEFAULT_TRANSACTION_STATUS_MESSAGE = + 'Undefined transaction status'; +export const SECOND_LOGIN_ATTEMPT_ERROR = + 'Action not allowed. User is logged in. Call logout() first'; +export const SENDER_DIFFERENT_THAN_LOGGED_IN_ADDRESS = + 'You cannot sign transactions from a different account'; diff --git a/src/constants/index.ts b/src/constants/index.ts index fd0ba1b..9ebad72 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -1,4 +1,7 @@ -export * from './network'; -export * from './placeholders'; -export * from './storage'; -export * from './window'; +export * from './network.constants'; +export * from './placeholders.constants'; +export * from './storage.constants'; +export * from './window.constants'; +export * from './browser.constants'; +export * from './errorMessages.constants'; +export * from './ledger.constants'; diff --git a/src/constants/ledger.constants.ts b/src/constants/ledger.constants.ts new file mode 100644 index 0000000..7941247 --- /dev/null +++ b/src/constants/ledger.constants.ts @@ -0,0 +1 @@ +export const LEDGER_CONTRACT_DATA_ENABLED_VALUE = 1; diff --git a/src/constants/network.ts b/src/constants/network.constants.ts similarity index 100% rename from src/constants/network.ts rename to src/constants/network.constants.ts diff --git a/src/constants/placeholders.constants.ts b/src/constants/placeholders.constants.ts new file mode 100644 index 0000000..70dd268 --- /dev/null +++ b/src/constants/placeholders.constants.ts @@ -0,0 +1,8 @@ +/** + * Not Applicable + * @value N/A + */ +export const N_A = 'N/A'; + +export const ZERO = '0'; +export const ELLIPSIS = '...'; diff --git a/src/constants/storage.ts b/src/constants/storage.constants.ts similarity index 87% rename from src/constants/storage.ts rename to src/constants/storage.constants.ts index 4280edf..9bae425 100644 --- a/src/constants/storage.ts +++ b/src/constants/storage.constants.ts @@ -1,5 +1,5 @@ import { createJSONStorage } from 'zustand/middleware'; -import { safeWindow } from './window'; +import { safeWindow } from './window.constants'; export const persistConfig: { persistReducersStorageType: 'localStorage' | 'sessionStorage'; diff --git a/src/constants/window.ts b/src/constants/window.constants.ts similarity index 100% rename from src/constants/window.ts rename to src/constants/window.constants.ts diff --git a/src/core/methods/account/getAccount.ts b/src/core/methods/account/getAccount.ts new file mode 100644 index 0000000..341e426 --- /dev/null +++ b/src/core/methods/account/getAccount.ts @@ -0,0 +1,6 @@ +import { accountSelector } from 'store/selectors'; +import { getState } from 'store/store'; + +export function getAccount() { + return accountSelector(getState()); +} diff --git a/src/core/methods/account/getAddress.ts b/src/core/methods/account/getAddress.ts new file mode 100644 index 0000000..56a6df4 --- /dev/null +++ b/src/core/methods/account/getAddress.ts @@ -0,0 +1,6 @@ +import { addressSelector } from 'store/selectors'; +import { getState } from 'store/store'; + +export function getAddress() { + return addressSelector(getState()); +} diff --git a/src/core/methods/account/getIsLoggedIn.ts b/src/core/methods/account/getIsLoggedIn.ts new file mode 100644 index 0000000..110d470 --- /dev/null +++ b/src/core/methods/account/getIsLoggedIn.ts @@ -0,0 +1,5 @@ +import { getAddress } from './getAddress'; + +export function getIsLoggedIn() { + return Boolean(getAddress()); +} diff --git a/src/core/methods/login/helpers/getLoginService.ts b/src/core/methods/login/helpers/getLoginService.ts new file mode 100644 index 0000000..0d8f3c5 --- /dev/null +++ b/src/core/methods/login/helpers/getLoginService.ts @@ -0,0 +1,141 @@ +import { Address, SignableMessage } from '@multiversx/sdk-core'; +import { nativeAuth } from 'services/nativeAuth'; +import { getNativeAuthConfig } from 'services/nativeAuth/methods'; +import { networkSelector, tokenLoginSelector } from 'store/selectors'; +import { getState } from 'store/store'; +import { OnProviderLoginType } from 'types/login.types'; +import { getAccount } from '../../account/getAccount'; +import { setTokenLogin } from 'store/actions/loginInfo/loginInfoActions'; +import { NativeAuthConfigType } from 'types/nativeAuth.types'; + +const getApiAddress = ( + apiAddress: string, + config?: OnProviderLoginType['nativeAuth'] +) => { + if (!config) { + return null; + } + if (config === true) { + return apiAddress; + } + return config.apiAddress ?? apiAddress; +}; + +export const getLoginService = (config?: OnProviderLoginType['nativeAuth']) => { + const network = networkSelector(getState()); + + const tokenLogin = tokenLoginSelector(getState()); + let tokenRef = tokenLogin?.loginToken; + + const apiAddress = getApiAddress(network.apiAddress, config); + + const configuration = getNativeAuthConfig({ + ...(config === true ? {} : config), + ...(apiAddress ? { apiAddress } : {}) + }); + + const hasNativeAuth = Boolean(config); + + const client = nativeAuth(configuration); + + const setLoginToken = (loginToken: string) => { + tokenRef = loginToken; + + setTokenLogin({ + ...tokenLogin, + loginToken, + ...(apiAddress ? { nativeAuthConfig: configuration } : {}) + }); + }; + + const getNativeAuthLoginToken = () => { + try { + return client.initialize(); + } catch (error) { + console.error('Unable to get block. Login failed.', error); + return; + } + }; + + const setTokenLoginInfo = ({ + address, + signature + }: { + address: string; + signature: string; + }) => { + const loginToken = tokenRef; + + if (!loginToken) { + throw 'Token not found. Call `setLoginToken` first.'; + } + + if (!hasNativeAuth) { + setTokenLogin({ + loginToken, + signature + }); + + return; + } + + const nativeAuthToken = client.getToken({ + address, + token: loginToken, + signature + }); + + setTokenLogin({ + loginToken, + signature, + nativeAuthToken, + ...(apiAddress ? { nativeAuthConfig: configuration } : {}) + }); + return nativeAuthToken; + }; + + const refreshNativeAuthTokenLogin = async ({ + signMessageCallback, + nativeAuthClientConfig + }: { + signMessageCallback: ( + messageToSign: SignableMessage, + options: Record + ) => Promise; + nativeAuthClientConfig?: NativeAuthConfigType; + }) => { + const { address } = getAccount(); + + const nativeAuthClient = nativeAuth( + nativeAuthClientConfig || configuration + ); + + const loginToken = await nativeAuthClient.initialize({ + noCache: Boolean(nativeAuthClientConfig) + }); + + tokenRef = loginToken; + if (!loginToken) { + return; + } + const messageToSign = new SignableMessage({ + address: new Address(address), + message: Buffer.from(`${address}${loginToken}`) + }); + const signedMessage = await signMessageCallback(messageToSign, {}); + const nativeAuthToken = setTokenLoginInfo({ + address, + signature: signedMessage.getSignature().toString('hex') + }); + + return nativeAuthToken; + }; + + return { + configuration, + setLoginToken, + getNativeAuthLoginToken, + setTokenLoginInfo, + refreshNativeAuthTokenLogin + }; +}; diff --git a/src/core/methods/login/helpers/getModifiedLoginToken.ts b/src/core/methods/login/helpers/getModifiedLoginToken.ts new file mode 100644 index 0000000..3c92e32 --- /dev/null +++ b/src/core/methods/login/helpers/getModifiedLoginToken.ts @@ -0,0 +1,43 @@ +import { decodeLoginToken } from 'services/nativeAuth/helpers/decodeLoginToken'; +import { LatestBlockHashType } from 'services/nativeAuth/helpers/getLatestBlockHash'; +import { nativeAuth } from 'services/nativeAuth/nativeAuth'; + +export interface GetMultiSigLoginTokenType { + loginToken?: string; + extraInfoData: { + multisig?: string; + impersonate?: string; + }; +} + +export const getModifiedLoginToken = async ({ + loginToken, + extraInfoData +}: GetMultiSigLoginTokenType) => { + if (loginToken == null || Object.keys(extraInfoData).length === 0) { + return null; + } + + const data = decodeLoginToken(String(loginToken)); + const { timestamp, ...rest } = data?.extraInfo || {}; + + const isValidData = data && timestamp != null; + + if (!isValidData) { + return null; + } + const latestBlockInfo: LatestBlockHashType = { + hash: String(data?.blockHash), + timestamp: Number(timestamp) + }; + + const tokenLogin = await nativeAuth({ + extraInfo: { ...rest, ...extraInfoData }, + expirySeconds: data?.ttl, + origin: data?.origin + }).initialize({ + latestBlockInfo + }); + + return tokenLogin; +}; diff --git a/src/core/methods/login/helpers/processModifiedAccount.ts b/src/core/methods/login/helpers/processModifiedAccount.ts new file mode 100644 index 0000000..a433019 --- /dev/null +++ b/src/core/methods/login/helpers/processModifiedAccount.ts @@ -0,0 +1,52 @@ +import { getAccount } from 'utils/account/getAccount'; +import { + getModifiedLoginToken, + GetMultiSigLoginTokenType +} from './getModifiedLoginToken'; + +interface SetMultisigLoginToken extends GetMultiSigLoginTokenType { + signature?: string; + address: string; + loginService: T; +} + +export const processModifiedAccount = async < + T extends { + setLoginToken: (loginToken: string) => void; + setTokenLoginInfo: ({ + address, + signature + }: { + address: string; + signature: string; + }) => string | undefined; + } +>({ + loginToken: token, + extraInfoData, + address, + signature, + loginService +}: SetMultisigLoginToken) => { + const loginToken = await getModifiedLoginToken({ + loginToken: token, + extraInfoData + }); + + const tokenAddress = + extraInfoData.multisig || extraInfoData.impersonate || address; + + const accountAddress = loginToken != null ? tokenAddress : address; + + if (loginToken != null) { + loginService.setLoginToken(loginToken); + } + + if (signature) { + loginService.setTokenLoginInfo({ signature, address }); + } + + const account = await getAccount(accountAddress); + + return account; +}; diff --git a/src/core/methods/login/helpers/tests/getModifiedLoginToken.test.ts b/src/core/methods/login/helpers/tests/getModifiedLoginToken.test.ts new file mode 100644 index 0000000..d5323da --- /dev/null +++ b/src/core/methods/login/helpers/tests/getModifiedLoginToken.test.ts @@ -0,0 +1,45 @@ +import { getModifiedLoginToken } from '../getModifiedLoginToken'; + +describe('getMultiSigLoginToken', () => { + test('returns null if loginToken or multisig is null', async () => { + const result = await getModifiedLoginToken({ + loginToken: undefined, + extraInfoData: { + multisig: + 'erd1qqqqqqqqqqqqqpgq944h7h6mckw6q0d3g223cjz4ytvken86u00sz7carw' + } + }); + + expect(result).toBeNull(); + }); + + test('returns null if data or timestamp is missing', async () => { + const result = await getModifiedLoginToken({ + loginToken: 'invalidLoginToken', + extraInfoData: { + multisig: + 'erd1qqqqqqqqqqqqqpgq944h7h6mckw6q0d3g223cjz4ytvken86u00sz7carw' + } + }); + + expect(result).toBeNull(); + }); + + test('returns valid tokenLogin for valid input', async () => { + const validInput = { + loginToken: + 'aHR0cHM6Ly9kZXZuZXQueGV4Y2hhbmdlLmNvbQ.d9ee880c609d5fe482a675826eb7e74f707c882e796ec191913a6c18d762685d.86400.eyJ0aW1lc3RhbXAiOjE3MDYxODAwMjd9', + extraInfoData: { + multisig: + 'erd1qqqqqqqqqqqqqpgq944h7h6mckw6q0d3g223cjz4ytvken86u00sz7carw' + } + }; + + const result = await getModifiedLoginToken(validInput); + + const expectedTokenLogin = + 'aHR0cHM6Ly9kZXZuZXQueGV4Y2hhbmdlLmNvbQ.d9ee880c609d5fe482a675826eb7e74f707c882e796ec191913a6c18d762685d.86400.eyJtdWx0aXNpZyI6ImVyZDFxcXFxcXFxcXFxcXFxcGdxOTQ0aDdoNm1ja3c2cTBkM2cyMjNjano0eXR2a2VuODZ1MDBzejdjYXJ3IiwidGltZXN0YW1wIjoxNzA2MTgwMDI3fQ'; + + expect(result).toEqual(expectedTokenLogin); + }); +}); diff --git a/src/core/methods/login/webWalletLogin.ts b/src/core/methods/login/webWalletLogin.ts new file mode 100644 index 0000000..d556e9f --- /dev/null +++ b/src/core/methods/login/webWalletLogin.ts @@ -0,0 +1,118 @@ +import { LoginMethodsEnum } from 'types/enums.types'; +import { OnProviderLoginType } from 'types/login.types'; +import { CrossWindowProvider } from '@multiversx/sdk-web-wallet-cross-window-provider/out/CrossWindowProvider/CrossWindowProvider'; +import { getWindowLocation } from 'utils/window/getWindowLocation'; +import { getLoginService } from './helpers/getLoginService'; +import { networkSelector } from 'store/selectors'; +import { getState } from 'store/store'; +import { getIsLoggedIn } from '../account/getIsLoggedIn'; +import { setAccountProvider } from 'core/providers/accountProvider'; +import { SECOND_LOGIN_ATTEMPT_ERROR } from 'constants/errorMessages.constants'; +import { isBrowserWithPopupConfirmation } from 'constants/browser.constants'; +import { processModifiedAccount } from './helpers/processModifiedAccount'; +import { loginAction } from 'store/actions/sharedActions'; +import { setAccount } from 'store/actions/account/accountActions'; +import { getLatestNonce } from 'utils/account/getLatestNonce'; +import { AccountType } from 'types/account.types'; + +export const webWalletLogin = async ({ + token: tokenToSign, + nativeAuth, + hasConsentPopup, + walletAddress +}: OnProviderLoginType & { + hasConsentPopup?: boolean; + walletAddress?: string; +}): Promise => { + const hasNativeAuth = nativeAuth != null; + const loginService = getLoginService(nativeAuth); + let token = tokenToSign; + const network = networkSelector(getState()); + + const isLoggedIn = getIsLoggedIn(); + + if (isLoggedIn) { + throw new Error(SECOND_LOGIN_ATTEMPT_ERROR); + } + + const isSuccessfullyInitialized: boolean = + await CrossWindowProvider.getInstance().init(); + const provider: CrossWindowProvider = + CrossWindowProvider.getInstance().setWalletUrl( + walletAddress ?? network.walletAddress + ); + + try { + if (!isSuccessfullyInitialized) { + console.warn('Something went wrong trying to redirect to wallet login..'); + return null; + } + + const { origin, pathname } = getWindowLocation(); + const callbackUrl: string = encodeURIComponent(`${origin}${pathname}`); + + if (hasNativeAuth && !token) { + token = await loginService.getNativeAuthLoginToken(); + + // Fetching block failed + if (!token) { + console.warn('Fetching block failed. Login cancelled.'); + return null; + } + } + + if (token) { + loginService.setLoginToken(token); + } + + const providerLoginData = { + callbackUrl, + ...(token && { token }) + }; + + const needsConsent = isBrowserWithPopupConfirmation && hasNativeAuth; + + if (needsConsent || hasConsentPopup) { + provider.setShouldShowConsentPopup(true); + } + + const { signature, address, multisig, impersonate } = + await provider.login(providerLoginData); + + setAccountProvider(provider); + + if (!address) { + console.warn('Login cancelled.'); + return null; + } + + const account = await processModifiedAccount({ + loginToken: token, + extraInfoData: { multisig, impersonate }, + address, + signature, + loginService + }); + + if (!account) { + return null; + } + + loginAction({ + address: account.address, + loginMethod: LoginMethodsEnum.crossWindow + }); + + const newAccount: AccountType = { + ...account, + nonce: getLatestNonce(account) + }; + + setAccount(newAccount); + + return newAccount; + } catch (error) { + console.error('error loging in', error); + throw error; + } +}; diff --git a/src/core/providers/accountProvider.ts b/src/core/providers/accountProvider.ts new file mode 100644 index 0000000..f73a536 --- /dev/null +++ b/src/core/providers/accountProvider.ts @@ -0,0 +1,17 @@ +import { CrossWindowProvider } from '@multiversx/sdk-web-wallet-cross-window-provider/out/CrossWindowProvider/CrossWindowProvider'; +import { IDappProvider } from 'types/dappProvider.types'; +import { emptyProvider } from './helpers/emptyProvider'; + +export type ProvidersType = IDappProvider | CrossWindowProvider; + +let accountProvider: ProvidersType = emptyProvider; + +export function setAccountProvider( + provider: TProvider +) { + accountProvider = provider; +} + +export function getAccountProvider(): IDappProvider { + return (accountProvider as IDappProvider) || emptyProvider; +} diff --git a/src/core/providers/helpers/emptyProvider.ts b/src/core/providers/helpers/emptyProvider.ts new file mode 100644 index 0000000..4511602 --- /dev/null +++ b/src/core/providers/helpers/emptyProvider.ts @@ -0,0 +1,111 @@ +import { SignableMessage, Transaction } from '@multiversx/sdk-core'; +import { IDappProvider } from 'types'; +import { EngineTypes } from 'utils/walletconnect/__sdkWalletconnectProvider'; + +export const DAPP_INIT_ROUTE = '/dapp/init'; + +const notInitializedError = (caller: string) => { + return `Unable to perform ${caller}, Provider not initialized`; +}; + +export class EmptyProvider implements IDappProvider { + init(): Promise { + return Promise.resolve(false); + } + + login( + options?: TOptions + ): Promise { + throw new Error(notInitializedError(`login with options: ${options}`)); + } + + logout( + options?: TOptions + ): Promise { + throw new Error(notInitializedError(`logout with options: ${options}`)); + } + + getAddress(): Promise { + throw new Error(notInitializedError('getAddress')); + } + + isInitialized(): boolean { + return false; + } + + isConnected(): Promise { + return Promise.resolve(false); + } + + sendTransaction?< + TOptions = { callbackUrl?: string }, + TResponse = Transaction + >(transaction: Transaction, options?: TOptions): Promise { + throw new Error( + notInitializedError( + `sendTransaction with transactions: ${transaction} options: ${options}` + ) + ); + } + + signTransaction( + transaction: Transaction, + options?: TOptions + ): Promise { + throw new Error( + notInitializedError( + `signTransaction with transactions: ${transaction} options: ${options}` + ) + ); + } + + signTransactions( + transactions: [], + options?: TOptions + ): Promise { + throw new Error( + notInitializedError( + `signTransactions with transactions: ${transactions} options: ${options}` + ) + ); + } + + signMessage( + message: T, + options: TOptions + ): Promise { + throw new Error( + notInitializedError( + `signTransactions with ${message} and options ${options}` + ) + ); + } + + sendCustomMessage?({ + method, + params + }: { + method: string; + params: any; + }): Promise { + throw new Error( + notInitializedError( + `sendCustomMessage with method: ${method} params: ${params}` + ) + ); + } + + sendCustomRequest?(options?: { + request: EngineTypes.RequestParams['request']; + }): Promise { + throw new Error( + notInitializedError(`sendSessionEvent with options: ${options}`) + ); + } + + ping?(): Promise { + return Promise.resolve(false); + } +} + +export const emptyProvider = new EmptyProvider(); diff --git a/src/core/providers/helpers/getLedgerConfiguration.ts b/src/core/providers/helpers/getLedgerConfiguration.ts new file mode 100644 index 0000000..0658cb3 --- /dev/null +++ b/src/core/providers/helpers/getLedgerConfiguration.ts @@ -0,0 +1,18 @@ +import { HWProvider } from '@multiversx/sdk-hw-provider'; +import { IHWWalletApp } from '@multiversx/sdk-hw-provider/out/interface'; + +import { LEDGER_CONTRACT_DATA_ENABLED_VALUE } from 'constants/index'; + +export const DAPP_INIT_ROUTE = '/dapp/init'; + +export const getLedgerConfiguration = async ( + initializedHwWalletP: HWProvider +) => { + if (!initializedHwWalletP.isInitialized()) { + throw new Error('Unable to get version. Provider not initialized'); + } + const hwApp: IHWWalletApp = (initializedHwWalletP as any).hwApp; + const { contractData, version } = await hwApp.getAppConfiguration(); + const dataEnabled = contractData === LEDGER_CONTRACT_DATA_ENABLED_VALUE; + return { version, dataEnabled }; +}; diff --git a/src/core/providers/helpers/utils.ts b/src/core/providers/helpers/utils.ts new file mode 100644 index 0000000..843c1d1 --- /dev/null +++ b/src/core/providers/helpers/utils.ts @@ -0,0 +1,34 @@ +import { ExtensionProvider } from '@multiversx/sdk-extension-provider'; +import { HWProvider } from '@multiversx/sdk-hw-provider'; +import { MetamaskProvider } from '@multiversx/sdk-metamask-provider/out/metamaskProvider'; +import { OperaProvider } from '@multiversx/sdk-opera-provider'; +import { CrossWindowProvider } from '@multiversx/sdk-web-wallet-cross-window-provider/out/CrossWindowProvider/CrossWindowProvider'; +import { WalletProvider } from '@multiversx/sdk-web-wallet-provider'; +import { LoginMethodsEnum } from 'types/enums.types'; +import { WalletConnectV2Provider } from 'utils/walletconnect/__sdkWalletconnectProvider'; +import { EmptyProvider } from './emptyProvider'; + +export const getProviderType = ( + provider?: TProvider | null +): LoginMethodsEnum => { + switch (provider?.constructor) { + case WalletProvider: + return LoginMethodsEnum.wallet; + case WalletConnectV2Provider: + return LoginMethodsEnum.walletconnectv2; + case HWProvider: + return LoginMethodsEnum.ledger; + case ExtensionProvider: + return LoginMethodsEnum.extension; + case MetamaskProvider: + return LoginMethodsEnum.metamask; + case OperaProvider: + return LoginMethodsEnum.opera; + case CrossWindowProvider: + return LoginMethodsEnum.crossWindow; + case EmptyProvider: + return LoginMethodsEnum.none; + default: + return LoginMethodsEnum.extra; + } +}; diff --git a/src/core/providers/index.ts b/src/core/providers/index.ts new file mode 100644 index 0000000..5cd1e7c --- /dev/null +++ b/src/core/providers/index.ts @@ -0,0 +1,2 @@ +export { getAccountProvider } from './accountProvider'; +export * from './helpers/getLedgerConfiguration'; diff --git a/src/services/nativeAuth/methods/getNativeAuthConfig.ts b/src/services/nativeAuth/methods/getNativeAuthConfig.ts index 78b8f9f..08bc3e8 100644 --- a/src/services/nativeAuth/methods/getNativeAuthConfig.ts +++ b/src/services/nativeAuth/methods/getNativeAuthConfig.ts @@ -1,5 +1,5 @@ import { getWindowLocation } from 'utils/window/getWindowLocation'; -import { NativeAuthConfigType } from '../nativeAuth.types'; +import { NativeAuthConfigType } from '../../../types/nativeAuth.types'; const defaultNativeAuthConfig = { origin: getWindowLocation().origin, diff --git a/src/services/nativeAuth/nativeAuth.ts b/src/services/nativeAuth/nativeAuth.ts index 9be0b33..060bc59 100644 --- a/src/services/nativeAuth/nativeAuth.ts +++ b/src/services/nativeAuth/nativeAuth.ts @@ -1,11 +1,12 @@ import { NativeAuthClient } from '@multiversx/sdk-native-auth-client'; +import { NativeAuthConfigType } from 'types/nativeAuth.types'; + import { getLatestBlockHash, LatestBlockHashType } from './helpers/getLatestBlockHash'; import { getNativeAuthConfig, getTokenExpiration } from './methods'; -import { NativeAuthConfigType } from './nativeAuth.types'; interface NativeAuthInitType { extraInfo?: { [key: string]: string }; diff --git a/src/store/actions/loginInfo/loginInfoActions.ts b/src/store/actions/loginInfo/loginInfoActions.ts new file mode 100644 index 0000000..e15d021 --- /dev/null +++ b/src/store/actions/loginInfo/loginInfoActions.ts @@ -0,0 +1,52 @@ +import { LoginMethodsEnum } from 'types/enums.types'; +import { store } from '../../store'; +import { TokenLoginType } from 'types/login.types'; +import { + LedgerLoginType, + LoginInfoType, + WalletConnectLoginType +} from 'store/slices/loginInfo/loginInfo.types'; + +export const setLoginMethod = (loginMethod: LoginMethodsEnum) => + store.setState(({ loginInfo: state }) => { + state.loginMethod = loginMethod; + }); + +export const setTokenLogin = (tokenLogin: TokenLoginType) => + store.setState(({ loginInfo: state }) => { + state.tokenLogin = tokenLogin; + }); + +export const setTokenLoginSignature = (signature: string) => + store.setState(({ loginInfo: state }) => { + if (state?.tokenLogin != null) { + state.tokenLogin.signature = signature; + } + }); + +export const setWalletLogin = (walletLogin: LoginInfoType | null) => + store.setState(({ loginInfo: state }) => { + state.walletLogin = walletLogin; + }); + +export const setWalletConnectLogin = ( + walletConnectLogin: WalletConnectLoginType | null +) => + store.setState(({ loginInfo: state }) => { + state.walletConnectLogin = walletConnectLogin; + }); + +export const setLedgerLogin = (ledgerLogin: LedgerLoginType | null) => + store.setState(({ loginInfo: state }) => { + state.ledgerLogin = ledgerLogin; + }); + +export const setLogoutRoute = (logoutRoute: string | undefined) => + store.setState(({ loginInfo: state }) => { + state.logoutRoute = logoutRoute; + }); + +export const setIsWalletConnectV2Initialized = (isInitialized: boolean) => + store.setState(({ loginInfo: state }) => { + state.isWalletConnectV2Initialized = isInitialized; + }); diff --git a/src/store/actions/network/initializeNetwork.ts b/src/store/actions/network/initializeNetwork.ts index 2862b0f..c03b1e3 100644 --- a/src/store/actions/network/initializeNetwork.ts +++ b/src/store/actions/network/initializeNetwork.ts @@ -1,8 +1,8 @@ import { getServerConfiguration } from 'apiCalls/configuration/getServerConfiguration'; -import { fallbackNetworkConfigurations } from 'constants/network'; import { EnvironmentsEnum } from 'types/enums.types'; import { CustomNetworkType, NetworkType } from 'types/network.types'; import { initializeNetworkConfig } from './networkActions'; +import { fallbackNetworkConfigurations } from 'constants/network.constants'; export type InitializeNetworkPropsType = { customNetworkConfig?: CustomNetworkType; diff --git a/src/store/actions/sharedActions/sharedActions.ts b/src/store/actions/sharedActions/sharedActions.ts index db32fc9..1fdd747 100644 --- a/src/store/actions/sharedActions/sharedActions.ts +++ b/src/store/actions/sharedActions/sharedActions.ts @@ -1,14 +1,24 @@ import { Address } from '@multiversx/sdk-core/out'; import { initialState as initialAccountState } from 'store/slices/account/accountSlice'; +import { initialState as initialLoginInfoState } from 'store/slices/loginInfo/loginInfoSlice'; import { store } from '../../store'; +import { LoginMethodsEnum } from 'types/enums.types'; -export const logout = () => - store.setState((state) => { - state.account = initialAccountState; +export const logoutAction = () => + store.setState((store) => { + store.account = initialAccountState; + store.loginInfo = initialLoginInfoState; }); -export const login = (address: string) => - store.setState(({ account }) => { +export interface LoginActionPayloadType { + address: string; + loginMethod: LoginMethodsEnum; +} + +export const loginAction = ({ address, loginMethod }: LoginActionPayloadType) => + store.setState(({ account, loginInfo }) => { account.address = address; account.publicKey = new Address(address).hex(); + loginInfo.loginMethod = loginMethod; + // setLoginExpiresAt(getNewLoginExpiresTimestamp()); }); diff --git a/src/store/selectors/accountSelectors.ts b/src/store/selectors/accountSelectors.ts index 72d3ce7..75d6fbf 100644 --- a/src/store/selectors/accountSelectors.ts +++ b/src/store/selectors/accountSelectors.ts @@ -1,7 +1,10 @@ -import { StoreType } from '../store'; +import { StoreType } from 'store/store.types'; export const accountSelector = ({ account: { accounts, address } }: StoreType) => accounts[address]; export const addressSelector = ({ account: { address } }: StoreType) => address; + +export const accountNonceSelector = (store: StoreType) => + accountSelector(store)?.nonce || 0; diff --git a/src/store/selectors/hooks/useSelector.ts b/src/store/selectors/hooks/useSelector.ts index 8b0db73..f51fd49 100644 --- a/src/store/selectors/hooks/useSelector.ts +++ b/src/store/selectors/hooks/useSelector.ts @@ -1,7 +1,10 @@ -import { StoreType, useStore } from '../../store'; +import { StoreType } from 'store/store.types'; +import { useStore } from '../../store'; type ExtractState = S extends { getState: () => infer X } ? X : StoreType; -export function useSelector(selector: (state: ExtractState) => T) { +export const useSelector = ( + selector: (state: ExtractState) => T +) => { return useStore(selector); -} \ No newline at end of file +}; diff --git a/src/store/selectors/index.ts b/src/store/selectors/index.ts index e17560d..5043925 100644 --- a/src/store/selectors/index.ts +++ b/src/store/selectors/index.ts @@ -1,3 +1,4 @@ export * from './accountSelectors'; export * from './networkSelectors'; export * from './storeSelector'; +export * from './loginInfoSelectors'; diff --git a/src/store/selectors/loginInfoSelectors.ts b/src/store/selectors/loginInfoSelectors.ts new file mode 100644 index 0000000..f8251c9 --- /dev/null +++ b/src/store/selectors/loginInfoSelectors.ts @@ -0,0 +1,6 @@ +import { StoreType } from 'store/store.types'; + +export const loginInfoSelector = ({ loginInfo }: StoreType) => loginInfo; + +export const tokenLoginSelector = ({ loginInfo }: StoreType) => + loginInfo.tokenLogin; diff --git a/src/store/selectors/networkSelectors.ts b/src/store/selectors/networkSelectors.ts index dcb8010..fe6f319 100644 --- a/src/store/selectors/networkSelectors.ts +++ b/src/store/selectors/networkSelectors.ts @@ -1,4 +1,4 @@ -import { StoreType } from '../store'; +import { StoreType } from 'store/store.types'; export const networkSliceSelector = ({ network }: StoreType) => network; diff --git a/src/store/selectors/storeSelector.ts b/src/store/selectors/storeSelector.ts index d901d56..a6235c0 100644 --- a/src/store/selectors/storeSelector.ts +++ b/src/store/selectors/storeSelector.ts @@ -1,3 +1,3 @@ -import { StoreType } from '../store'; +import { StoreType } from 'store/store.types'; export const stateSelector = (state: StoreType) => state; diff --git a/src/store/slices/account/accountSlice.ts b/src/store/slices/account/accountSlice.ts index 10cb692..680ab68 100644 --- a/src/store/slices/account/accountSlice.ts +++ b/src/store/slices/account/accountSlice.ts @@ -1,5 +1,5 @@ import { StateCreator } from 'zustand/vanilla'; -import { DAppStoreState, MutatorsIn } from 'store/store.types'; +import { StoreType, MutatorsIn } from 'store/store.types'; import { AccountSliceType } from './account.types'; import { emptyAccount } from './emptyAccount'; @@ -14,7 +14,7 @@ export const initialState: AccountSliceType = { }; function getAccountSlice(): StateCreator< - DAppStoreState, + StoreType, MutatorsIn, [], AccountSliceType diff --git a/src/store/slices/loginInfo/index.ts b/src/store/slices/loginInfo/index.ts new file mode 100644 index 0000000..33acda8 --- /dev/null +++ b/src/store/slices/loginInfo/index.ts @@ -0,0 +1 @@ +export * from './loginInfoSlice'; diff --git a/src/store/slices/loginInfo/loginInfo.types.ts b/src/store/slices/loginInfo/loginInfo.types.ts new file mode 100644 index 0000000..4201306 --- /dev/null +++ b/src/store/slices/loginInfo/loginInfo.types.ts @@ -0,0 +1,31 @@ +import { LoginMethodsEnum } from 'types/enums.types'; +import { TokenLoginType } from 'types/login.types'; + +export interface WalletConnectLoginType { + loginType: string; + callbackRoute: string; + logoutRoute: string; +} + +export interface LedgerLoginType { + index: number; + loginType: string; +} + +export interface LoginInfoType { + data: any; + expires: number; +} + +export interface LoginInfoSliceType { + loginMethod: LoginMethodsEnum; + walletConnectLogin: WalletConnectLoginType | null; + ledgerLogin: LedgerLoginType | null; + tokenLogin: TokenLoginType | null; + walletLogin: LoginInfoType | null; + extensionLogin: LoginInfoType | null; + operaLogin: LoginInfoType | null; + crossWindowLogin: LoginInfoType | null; + logoutRoute?: string; + isWalletConnectV2Initialized?: boolean; +} diff --git a/src/store/slices/loginInfo/loginInfoSlice.ts b/src/store/slices/loginInfo/loginInfoSlice.ts new file mode 100644 index 0000000..fb455d0 --- /dev/null +++ b/src/store/slices/loginInfo/loginInfoSlice.ts @@ -0,0 +1,26 @@ +import { LoginMethodsEnum } from 'types/enums.types'; +import { StateCreator } from 'zustand/vanilla'; +import { StoreType, MutatorsIn } from 'store/store.types'; +import { LoginInfoSliceType } from './loginInfo.types'; + +export const initialState: LoginInfoSliceType = { + loginMethod: LoginMethodsEnum.none, + walletConnectLogin: null, + ledgerLogin: null, + tokenLogin: null, + walletLogin: null, + extensionLogin: null, + operaLogin: null, + crossWindowLogin: null +}; + +function getTokenInfoSlice(): StateCreator< + StoreType, + MutatorsIn, + [], + LoginInfoSliceType +> { + return () => initialState; +} + +export const loginInfoSlice = getTokenInfoSlice(); diff --git a/src/store/slices/network/networkSlice.ts b/src/store/slices/network/networkSlice.ts index d1e8d1c..f0163c8 100644 --- a/src/store/slices/network/networkSlice.ts +++ b/src/store/slices/network/networkSlice.ts @@ -1,6 +1,6 @@ import { StateCreator } from 'zustand/vanilla'; import { NetworkSliceType } from './networkSlice.types'; -import { DAppStoreState, MutatorsIn } from 'store/store.types'; +import { StoreType, MutatorsIn } from 'store/store.types'; import { emptyNetwork } from './emptyNetwork'; const initialState: NetworkSliceType = { @@ -8,7 +8,7 @@ const initialState: NetworkSliceType = { }; function getNetworkSlice(): StateCreator< - DAppStoreState, + StoreType, MutatorsIn, [], NetworkSliceType diff --git a/src/store/store.ts b/src/store/store.ts index 63a0c0e..5600c50 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -2,15 +2,10 @@ import { createStore } from 'zustand/vanilla'; import { createJSONStorage, devtools, persist } from 'zustand/middleware'; import { immer } from 'zustand/middleware/immer'; import { networkSlice } from './slices/network/networkSlice'; -import { NetworkSliceType } from './slices/network/networkSlice.types'; -import { AccountSliceType } from './slices/account/account.types'; import { accountSlice } from './slices/account/accountSlice'; import { createBoundedUseStore } from './createBoundedStore'; - -export type StoreType = { - network: NetworkSliceType; - account: AccountSliceType; -}; +import { loginInfoSlice } from './slices/loginInfo'; +import { StoreType } from './store.types'; export type MutatorsIn = [ ['zustand/devtools', never], @@ -29,7 +24,8 @@ export const store = createStore( persist( immer((...args) => ({ network: networkSlice(...args), - account: accountSlice(...args) + account: accountSlice(...args), + loginInfo: loginInfoSlice(...args) })), { name: 'sdk-dapp-store', diff --git a/src/store/store.types.ts b/src/store/store.types.ts index 7454446..8fa32da 100644 --- a/src/store/store.types.ts +++ b/src/store/store.types.ts @@ -1,9 +1,11 @@ import { AccountSliceType } from './slices/account/account.types'; +import { LoginInfoSliceType } from './slices/loginInfo/loginInfo.types'; import { NetworkSliceType } from './slices/network/networkSlice.types'; -export type DAppStoreState = { +export type StoreType = { network: NetworkSliceType; account: AccountSliceType; + loginInfo: LoginInfoSliceType; }; export type MutatorsIn = [ @@ -14,6 +16,6 @@ export type MutatorsIn = [ export type MutatorsOut = [ ['zustand/devtools', never], - ['zustand/persist', DAppStoreState], + ['zustand/persist', StoreType], ['zustand/immer', never] ]; diff --git a/src/types/dappProvider.types.ts b/src/types/dappProvider.types.ts new file mode 100644 index 0000000..7260263 --- /dev/null +++ b/src/types/dappProvider.types.ts @@ -0,0 +1,32 @@ +import { Transaction } from '@multiversx/sdk-core'; +import type { IDAppProviderBase } from '@multiversx/sdk-dapp-utils/out/models/dappProviderBase'; +import { EngineTypes } from 'utils/walletconnect/__sdkWalletconnectProvider'; +import { Nullable } from './misc.types'; + +export interface DappOptions { + callbackUrl?: string; +} + +export interface IDappProvider extends IDAppProviderBase { + init?(): Promise; + getAddress(): Promise; + isInitialized(): boolean; + isConnected(): Promise; + sendTransaction?( + transaction: Transaction, + options?: DappOptions + ): Promise; + sendCustomMessage?({ + method, + params + }: { + method: string; + params: any; + }): Promise; + sendCustomRequest?(options?: { + request: EngineTypes.RequestParams['request']; + }): Promise; + ping?(): Promise; + relogin?: () => Promise>; + setShouldShowConsentPopup?: (shouldShow: boolean) => void; +} diff --git a/src/types/index.ts b/src/types/index.ts index 77c7609..a7a06d6 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,2 +1,4 @@ export * from './enums.types'; export * from './network.types'; +export * from './misc.types'; +export * from './dappProvider.types'; diff --git a/src/types/login.types.ts b/src/types/login.types.ts new file mode 100644 index 0000000..148fe05 --- /dev/null +++ b/src/types/login.types.ts @@ -0,0 +1,19 @@ +import { NativeAuthConfigType } from './nativeAuth.types'; + +export interface OnProviderLoginType { + token?: string; + /** + * If set to `true`, will fallback on default configuration + */ + nativeAuth?: NativeAuthConfigType | boolean; +} + +export interface TokenLoginType { + loginToken: string; + signature?: string; + nativeAuthToken?: string; + /** + * config to be restored when web wallet provider returns url signature + */ + nativeAuthConfig?: NativeAuthConfigType; +} diff --git a/src/types/misc.types.ts b/src/types/misc.types.ts new file mode 100644 index 0000000..aa32b2d --- /dev/null +++ b/src/types/misc.types.ts @@ -0,0 +1 @@ +export type Nullable = T | null; diff --git a/src/types/nativeAuth.types.ts b/src/types/nativeAuth.types.ts new file mode 100644 index 0000000..c0c6b88 --- /dev/null +++ b/src/types/nativeAuth.types.ts @@ -0,0 +1,17 @@ +export interface NativeAuthConfigType { + origin?: string; + apiAddress?: string; + expirySeconds?: number; + blockHashShard?: number; + gatewayUrl?: string; + extraRequestHeaders?: { [key: string]: string }; + extraInfo?: { + [key: string]: string; + }; + /** + * Displays a logout toast warning before token expiration. Defaults to 5 minutes. + * + * If set to `null`, will not trigger any warning. + */ + tokenExpirationToastWarningSeconds?: number | null; +} diff --git a/src/utils/account/getAccount.ts b/src/utils/account/getAccount.ts new file mode 100644 index 0000000..b4da6d5 --- /dev/null +++ b/src/utils/account/getAccount.ts @@ -0,0 +1,3 @@ +import { getAccountFromApi } from 'apiCalls/accounts/getAccountFromApi'; + +export const getAccount = (address?: string) => getAccountFromApi(address); diff --git a/src/utils/account/getLatestNonce.ts b/src/utils/account/getLatestNonce.ts new file mode 100644 index 0000000..e5ebbe5 --- /dev/null +++ b/src/utils/account/getLatestNonce.ts @@ -0,0 +1,13 @@ +import { accountNonceSelector } from 'store/selectors/accountSelectors'; +import { getState } from 'store/store'; +import { AccountType } from 'types/account.types'; + +export const getLatestNonce = (account: AccountType | null) => { + const currentAccountNonce = accountNonceSelector(getState()); + if (!account) { + return currentAccountNonce; + } + return currentAccountNonce && !isNaN(currentAccountNonce) + ? Math.max(currentAccountNonce, account.nonce) + : account.nonce; +}; diff --git a/src/utils/account/index.ts b/src/utils/account/index.ts new file mode 100644 index 0000000..e8c98d1 --- /dev/null +++ b/src/utils/account/index.ts @@ -0,0 +1,2 @@ +export * from './getAccount'; +export * from './getLatestNonce'; diff --git a/src/utils/index.ts b/src/utils/index.ts index df58c3b..c14cfcf 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -3,4 +3,5 @@ export * from './window'; export * from './asyncActions'; export * from './decoders'; export * from './validation'; +export * from './account'; export * from './retryMultipleTimes'; diff --git a/src/utils/walletconnect/__mocks__/sdkWalletconnectProvider.ts b/src/utils/walletconnect/__mocks__/sdkWalletconnectProvider.ts new file mode 100644 index 0000000..55b50ff --- /dev/null +++ b/src/utils/walletconnect/__mocks__/sdkWalletconnectProvider.ts @@ -0,0 +1,17 @@ +import { EmptyProvider } from 'core/providers/helpers/emptyProvider'; + +type SessionEventTypes = any; +type PairingTypes = any; +type EngineTypes = any; +const WalletConnectMethodsEnum = {}; +const WalletConnectOptionalMethodsEnum = {}; +const WalletConnectV2Provider = EmptyProvider; + +export { + EngineTypes, + PairingTypes, + SessionEventTypes, + WalletConnectMethodsEnum, + WalletConnectOptionalMethodsEnum, + WalletConnectV2Provider +}; diff --git a/src/utils/walletconnect/__sdkWalletconnectProvider.ts b/src/utils/walletconnect/__sdkWalletconnectProvider.ts new file mode 100644 index 0000000..7442e48 --- /dev/null +++ b/src/utils/walletconnect/__sdkWalletconnectProvider.ts @@ -0,0 +1,22 @@ +import { + SessionEventTypes, + PairingTypes, + EngineTypes +} from '@multiversx/sdk-wallet-connect-provider'; +import { + Operation as WalletConnectMethodsEnum, + OptionalOperation as WalletConnectOptionalMethodsEnum +} from '@multiversx/sdk-wallet-connect-provider/out/operation'; +import { WalletConnectV2Provider } from '@multiversx/sdk-wallet-connect-provider/out/walletConnectV2Provider'; + +/** + * These members are ingnored when compiling to commonJS + */ +export { + EngineTypes, + PairingTypes, + SessionEventTypes, + WalletConnectMethodsEnum, + WalletConnectOptionalMethodsEnum, + WalletConnectV2Provider +}; diff --git a/yarn.lock b/yarn.lock index 2d18b94..a765718 100644 --- a/yarn.lock +++ b/yarn.lock @@ -448,6 +448,38 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.1.1.tgz#eb0f82461d12779bbafc1b5045cde3143d350a8a" integrity sha512-5WoDz3Y19Bg2BnErkZTp0en+c/i9PvgFS7MBe1+m60HjFr0hrphlAGp4yzI7pxpt4xShln4ZyYp4neJm8hmOkQ== +"@ethereumjs/common@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-3.2.0.tgz#b71df25845caf5456449163012074a55f048e0a0" + integrity sha512-pksvzI0VyLgmuEF2FA/JR/4/y6hcPq8OUail3/AvycBaW1d5VSauOZzqGvJ3RTmR4MU35lWE8KseKOsEhrFRBA== + dependencies: + "@ethereumjs/util" "^8.1.0" + crc-32 "^1.2.0" + +"@ethereumjs/rlp@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-4.0.1.tgz#626fabfd9081baab3d0a3074b0c7ecaf674aaa41" + integrity sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw== + +"@ethereumjs/tx@^4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-4.2.0.tgz#5988ae15daf5a3b3c815493bc6b495e76009e853" + integrity sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw== + dependencies: + "@ethereumjs/common" "^3.2.0" + "@ethereumjs/rlp" "^4.0.1" + "@ethereumjs/util" "^8.1.0" + ethereum-cryptography "^2.0.0" + +"@ethereumjs/util@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/util/-/util-8.1.0.tgz#299df97fb6b034e0577ce9f94c7d9d1004409ed4" + integrity sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA== + dependencies: + "@ethereumjs/rlp" "^4.0.1" + ethereum-cryptography "^2.0.0" + micro-ftch "^0.3.1" + "@humanwhocodes/config-array@^0.13.0": version "0.13.0" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" @@ -731,6 +763,191 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@ledgerhq/devices@8.0.3": + version "8.0.3" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.0.3.tgz#bca76789b9dec2353ea8b089f7bd183ed3047afd" + integrity sha512-Q7/vqkGELSBuwFafFoTqlHIRyOjw8JqbSgiQwe2R38xN0RKtKIh+5E6UfMKyoExiq+SrQg0IC8P2LS+XdjOHLw== + dependencies: + "@ledgerhq/errors" "^6.12.6" + "@ledgerhq/logs" "^6.10.1" + rxjs "6" + semver "^7.3.5" + +"@ledgerhq/devices@^8.0.3", "@ledgerhq/devices@^8.0.5", "@ledgerhq/devices@^8.4.0": + version "8.4.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.4.0.tgz#f3a03576d4a53d731bdaa212a00bd0adbfb86fb1" + integrity sha512-TUrMlWZJ+5AFp2lWMw4rGQoU+WtjIqlFX5SzQDL9phaUHrt4TFierAGHsaj5+tUHudhD4JhIaLI2cn1NOyq5NQ== + dependencies: + "@ledgerhq/errors" "^6.17.0" + "@ledgerhq/logs" "^6.12.0" + rxjs "^7.8.1" + semver "^7.3.5" + +"@ledgerhq/errors@6.12.6": + version "6.12.6" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.12.6.tgz#f89c82c91c2930f34bc3e0d86a27ec7b6e6e4f5f" + integrity sha512-D+r2B09vaRO06wfGoss+rNgwqWSoK0bCtsaJWzlD2hv1zxTtucqVtSztbRFypIqxWTCb3ix5Nh2dWHEJVTp2Xw== + +"@ledgerhq/errors@^6.12.6", "@ledgerhq/errors@^6.13.0", "@ledgerhq/errors@^6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.17.0.tgz#0d56361fe6eb7de3b239e661710679f933f1fcca" + integrity sha512-xnOVpy/gUUkusEORdr2Qhw3Vd0MGfjyVGgkGR9Ck6FXE26OIdIQ3tNmG5BdZN+gwMMFJJVxxS4/hr0taQfZ43w== + +"@ledgerhq/hw-transport-web-ble@6.27.17": + version "6.27.17" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-web-ble/-/hw-transport-web-ble-6.27.17.tgz#40bdf67dd277863c307399ea42f62e607c88b278" + integrity sha512-OoKbImhgyi43F6PM2KAJfViW+oEmZ3M8Tq9XZ0X57oL6QCQUYv6FakEFFkZzNuNWFdtFKGPgNt6xygqIdNElEQ== + dependencies: + "@ledgerhq/devices" "^8.0.5" + "@ledgerhq/errors" "^6.13.0" + "@ledgerhq/hw-transport" "^6.28.6" + "@ledgerhq/logs" "^6.10.1" + rxjs "6" + +"@ledgerhq/hw-transport-webhid@6.27.15": + version "6.27.15" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.15.tgz#36cbf1fd710dee19f51519668229a5df95b05046" + integrity sha512-xhtFy/SNttvBna8t1ZiP74K6Lj8uDhp0W+Zjvwz4IS6tS9gWZbKUB7scbrNrJep6Q77Of1bzDXrswyaoxFZrUg== + dependencies: + "@ledgerhq/devices" "^8.0.3" + "@ledgerhq/errors" "^6.12.6" + "@ledgerhq/hw-transport" "^6.28.4" + "@ledgerhq/logs" "^6.10.1" + +"@ledgerhq/hw-transport-webusb@6.27.15": + version "6.27.15" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.27.15.tgz#b661000ca68f21ed1cd4f931f0c9690b217529fc" + integrity sha512-XRteQmJMFbMETOwwwJrXhEvBEdu1DpuDQNI04bzMQE9p81rLjwd6pIhfP/W1O94av7Iq4kaatNsNpxkitmp59w== + dependencies: + "@ledgerhq/devices" "^8.0.3" + "@ledgerhq/errors" "^6.12.6" + "@ledgerhq/hw-transport" "^6.28.4" + "@ledgerhq/logs" "^6.10.1" + +"@ledgerhq/hw-transport@6.28.4": + version "6.28.4" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.4.tgz#c2fc5bff4fca71ac44f069b775d33d0b1b5d9000" + integrity sha512-fB2H92YQjidmae2GFCmOGPwkZWk0lvTu0tlLlzfiY0wRheAG+DEgjnqhdU8wmydkPLIj0WUjRgldtnJtg/a2iQ== + dependencies: + "@ledgerhq/devices" "^8.0.3" + "@ledgerhq/errors" "^6.12.6" + events "^3.3.0" + +"@ledgerhq/hw-transport@^6.28.4", "@ledgerhq/hw-transport@^6.28.6": + version "6.31.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.31.0.tgz#82d8154bbcec8dc0104009a646159190fba5ae76" + integrity sha512-BY1poLk8vlJdIYngp8Zfaa/V9n14dqgt1G7iNetVRhJVFEKp9EYONeC3x6q/N7x81LUpzBk6M+T+s46Z4UiXHw== + dependencies: + "@ledgerhq/devices" "^8.4.0" + "@ledgerhq/errors" "^6.17.0" + "@ledgerhq/logs" "^6.12.0" + events "^3.3.0" + +"@ledgerhq/logs@^6.10.1", "@ledgerhq/logs@^6.12.0": + version "6.12.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.12.0.tgz#ad903528bf3687a44da435d7b2479d724d374f5d" + integrity sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA== + +"@lifeomic/axios-fetch@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@lifeomic/axios-fetch/-/axios-fetch-3.0.1.tgz#a0f135470d7bb54d0ce82b0a2f3b19daa7bf77e2" + integrity sha512-bwEgYXtGrn/F+yYqoUIAWBRzyqQ7yB1VL84gCq0uAk36GRoyoWyOzbE35VWeXlmkkoby91FnAwh4UhgayMM/og== + dependencies: + "@types/node-fetch" "^2.5.10" + +"@metamask/json-rpc-engine@^7.3.2": + version "7.3.3" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-engine/-/json-rpc-engine-7.3.3.tgz#f2b30a2164558014bfcca45db10f5af291d989af" + integrity sha512-dwZPq8wx9yV3IX2caLi9q9xZBw2XeIoYqdyihDDDpuHVCEiqadJLwqM3zy+uwf6F1QYQ65A8aOMQg1Uw7LMLNg== + dependencies: + "@metamask/rpc-errors" "^6.2.1" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + +"@metamask/json-rpc-middleware-stream@^6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-middleware-stream/-/json-rpc-middleware-stream-6.0.2.tgz#75852ce481f8f9f091edbfc04ffdf964f8f3cabd" + integrity sha512-jtyx3PRfc1kqoLpYveIVQNwsxYKefc64/LCl9h9Da1m3nUKEvypbYuXSIwi237qvOjKmNHQKsDOZg6f4uBf62Q== + dependencies: + "@metamask/json-rpc-engine" "^7.3.2" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + readable-stream "^3.6.2" + +"@metamask/object-multiplex@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@metamask/object-multiplex/-/object-multiplex-2.0.0.tgz#aa6e4aa7b4e2f457ea4bb51cd7281d931e0aa35d" + integrity sha512-+ItrieVZie3j2LfYE0QkdW3dsEMfMEp419IGx1zyeLqjRZ14iQUPRO0H6CGgfAAoC0x6k2PfCAGRwJUA9BMrqA== + dependencies: + once "^1.4.0" + readable-stream "^3.6.2" + +"@metamask/providers@16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-16.0.0.tgz#5ba3bcbdc59b334958f1dcf6ed9b7f68de55eff1" + integrity sha512-zqZpn7Tg+QuvhL9x1WYCdXjFclZrMR2LOU2a3kHVFms5pOfizzFApB492VFgHuv/5xKohSxDkhXpAZ/TNGmM4g== + dependencies: + "@metamask/json-rpc-engine" "^7.3.2" + "@metamask/json-rpc-middleware-stream" "^6.0.2" + "@metamask/object-multiplex" "^2.0.0" + "@metamask/rpc-errors" "^6.2.1" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + detect-browser "^5.2.0" + extension-port-stream "^3.0.0" + fast-deep-equal "^3.1.3" + is-stream "^2.0.0" + readable-stream "^3.6.2" + webextension-polyfill "^0.10.0" + +"@metamask/rpc-errors@^6.2.1": + version "6.3.1" + resolved "https://registry.yarnpkg.com/@metamask/rpc-errors/-/rpc-errors-6.3.1.tgz#d5bb4740e070c3d87e91717ff4c3c6061a081cab" + integrity sha512-ugDY7cKjF4/yH5LtBaOIKHw/AiGGSAmzptAUEiAEGr/78LwuzcXAxmzEQfSfMIfI+f9Djr8cttq1pRJJKfTuCg== + dependencies: + "@metamask/utils" "^9.0.0" + fast-safe-stringify "^2.0.6" + +"@metamask/safe-event-emitter@^3.0.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-3.1.1.tgz#e89b840a7af8097a8ed4953d8dc8470d1302d3ef" + integrity sha512-ihb3B0T/wJm1eUuArYP4lCTSEoZsClHhuWyfo/kMX3m/odpqNcPfsz5O2A3NT7dXCAgWPGDQGPqygCpgeniKMw== + +"@metamask/superstruct@^3.0.0", "@metamask/superstruct@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@metamask/superstruct/-/superstruct-3.1.0.tgz#148f786a674fba3ac885c1093ab718515bf7f648" + integrity sha512-N08M56HdOgBfRKkrgCMZvQppkZGcArEop3kixNEtVbJKm6P9Cfg0YkI6X0s1g78sNrj2fWUwvJADdZuzJgFttA== + +"@metamask/utils@^8.3.0": + version "8.5.0" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-8.5.0.tgz#ddd0d4012d5191809404c97648a837ea9962cceb" + integrity sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ== + dependencies: + "@ethereumjs/tx" "^4.2.0" + "@metamask/superstruct" "^3.0.0" + "@noble/hashes" "^1.3.1" + "@scure/base" "^1.1.3" + "@types/debug" "^4.1.7" + debug "^4.3.4" + pony-cause "^2.1.10" + semver "^7.5.4" + uuid "^9.0.1" + +"@metamask/utils@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-9.0.0.tgz#cbcdf90e2cfc425f67731fc50d44bdf501daae36" + integrity sha512-Q/PzQCm6rkmePxHghXgJuYEkVfSvwKLLFZwFtfmLAz4mxIPuFJSMawaJM7sfZsVybK5Bf9QaKAjgMvHk5iGGvA== + dependencies: + "@ethereumjs/tx" "^4.2.0" + "@metamask/superstruct" "^3.1.0" + "@noble/hashes" "^1.3.1" + "@scure/base" "^1.1.3" + "@types/debug" "^4.1.7" + debug "^4.3.4" + pony-cause "^2.1.10" + semver "^7.5.4" + uuid "^9.0.1" + "@mswjs/cookies@^0.2.2": version "0.2.2" resolved "https://registry.yarnpkg.com/@mswjs/cookies/-/cookies-0.2.2.tgz#b4e207bf6989e5d5427539c2443380a33ebb922b" @@ -753,6 +970,20 @@ strict-event-emitter "^0.2.4" web-encoding "^1.1.5" +"@multiversx/sdk-core@12.18.0": + version "12.18.0" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-12.18.0.tgz#ae99665f9afb2bd4f1e325cb7daabb1dbcc55ca6" + integrity sha512-F+xGslPMkkZ0S/Q8UJZsMYl0mgHIuK/GdVsNFPiMKxQsKkxA2LTjNdPxVxjwgvRmN7WfdsTtQvmlsA5O1NYhBg== + dependencies: + "@multiversx/sdk-transaction-decoder" "1.0.2" + bech32 "1.1.4" + bignumber.js "9.0.1" + blake2b "2.1.3" + buffer "6.0.3" + json-duplicate-key-handle "1.0.0" + keccak "3.0.2" + protobufjs "7.2.4" + "@multiversx/sdk-core@>= 13.0.0": version "13.2.1" resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-13.2.1.tgz#ed7cb7048b76d611adb2601ecb58eddb74977228" @@ -770,6 +1001,33 @@ resolved "https://registry.yarnpkg.com/@multiversx/sdk-dapp-utils/-/sdk-dapp-utils-0.0.1.tgz#ba8bd9319649d45dea9a76beca1e03d957dea2cb" integrity sha512-fl3TdES93Jc4T559BI+QxNRGRUTabb7TiAXHKL9g6mbLD+silK+5euAoDpPBkbZpVFnfsXQssUVuyKBV4Ine6w== +"@multiversx/sdk-extension-provider@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-extension-provider/-/sdk-extension-provider-3.0.0.tgz#e0e178ee5555f9440457547759621f5c3152c5fa" + integrity sha512-xNHLShzimYbMXqEJoiNyB4fNOXQUwSJCzt9FiOA4GdxucJnCgIM25mXtSj2I93cz+KD39QgRjEYep+li/lykOw== + +"@multiversx/sdk-hw-provider@6.4.0": + version "6.4.0" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-hw-provider/-/sdk-hw-provider-6.4.0.tgz#a9afda37a23b2950c8b9a4c1f1ddbf1e513b0fda" + integrity sha512-o+iO64U7gi3oqQHIaCNWoOCarrOQyjXEq7kEsWg/HXJOANpc+lq4GiXPtBkN5mOwPoj/UlEk1HfxA+54mTCFNQ== + dependencies: + "@ledgerhq/devices" "8.0.3" + "@ledgerhq/errors" "6.12.6" + "@ledgerhq/hw-transport" "6.28.4" + "@ledgerhq/hw-transport-web-ble" "6.27.17" + "@ledgerhq/hw-transport-webhid" "6.27.15" + "@ledgerhq/hw-transport-webusb" "6.27.15" + buffer "6.0.3" + platform "1.3.6" + +"@multiversx/sdk-metamask-provider@0.0.5": + version "0.0.5" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-metamask-provider/-/sdk-metamask-provider-0.0.5.tgz#9f07ec8b9d1d2b2d88e8a9bccc149f01f144be37" + integrity sha512-IicSD/0G6/ZyU5j1Q6YXcXqILZu54ZjvoN1iunffYCDYeBSt1RZrUUdvBAfzjx47ubvX8Ic0iVbfgykjBCLfCQ== + dependencies: + "@metamask/providers" "16.0.0" + "@multiversx/sdk-core" "12.18.0" + "@multiversx/sdk-native-auth-client@^1.0.8": version "1.0.8" resolved "https://registry.yarnpkg.com/@multiversx/sdk-native-auth-client/-/sdk-native-auth-client-1.0.8.tgz#160b34b9ce80595008b1d7fdab75cea6347eb907" @@ -777,6 +1035,11 @@ dependencies: axios "^1.6.8" +"@multiversx/sdk-opera-provider@1.0.0-alpha.1": + version "1.0.0-alpha.1" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-opera-provider/-/sdk-opera-provider-1.0.0-alpha.1.tgz#2beebd5423fdc2e667b33660f17cbff325449097" + integrity sha512-5hrqn+kNpuy/S6eV5wh5mE4lvQo0PduZ7fLsh/2Srcaz3K5kM5lE1VyQmWk4DTxToZSldrGbgWz/olezoC6fPg== + "@multiversx/sdk-transaction-decoder@1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@multiversx/sdk-transaction-decoder/-/sdk-transaction-decoder-1.0.2.tgz#83ded4f6d4b877b4421234856eb19709be2af31b" @@ -784,6 +1047,15 @@ dependencies: bech32 "^2.0.0" +"@multiversx/sdk-wallet-connect-provider@4.1.2": + version "4.1.2" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-wallet-connect-provider/-/sdk-wallet-connect-provider-4.1.2.tgz#db8472c334507fcf4191227a170177d1404be1ce" + integrity sha512-zdJna8ZNhEtNQYL4xjoPDbsKlAaruvLdAKVn6sxyyd90ME1+5T5Owp5ITMZdihOLPaGjmvjRKNgy777iADyqTQ== + dependencies: + "@walletconnect/sign-client" "2.12.2" + "@walletconnect/utils" "2.12.2" + bech32 "1.1.4" + "@multiversx/sdk-web-wallet-cross-window-provider@0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-0.2.0.tgz#0fab56632b77556349ed04d97bffdee02bc0d3d3" @@ -793,6 +1065,25 @@ "@types/qs" "6.9.10" qs "6.11.2" +"@multiversx/sdk-web-wallet-provider@3.2.1": + version "3.2.1" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-provider/-/sdk-web-wallet-provider-3.2.1.tgz#94ba12140f4f9f35f30b8e13186baa78db4ddaae" + integrity sha512-f0CHVsBephFhoQtCAx9y2WhiIZEaNgn0oVa+sZNkgILcXU53Gm8Rj8wMfM0SDimHBYcXCcBDedyLCU3MioOjoQ== + dependencies: + qs "6.10.3" + +"@noble/curves@1.4.2", "@noble/curves@~1.4.0": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.2.tgz#40309198c76ed71bc6dbf7ba24e81ceb4d0d1fe9" + integrity sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw== + dependencies: + "@noble/hashes" "1.4.0" + +"@noble/hashes@1.4.0", "@noble/hashes@^1.3.1", "@noble/hashes@~1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" + integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -819,6 +1110,98 @@ resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-1.0.3.tgz#db9cc719191a62e7d9200f6e7bab21c5b848adca" integrity sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q== +"@parcel/watcher-android-arm64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz#c2c19a3c442313ff007d2d7a9c2c1dd3e1c9ca84" + integrity sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg== + +"@parcel/watcher-darwin-arm64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.4.1.tgz#c817c7a3b4f3a79c1535bfe54a1c2818d9ffdc34" + integrity sha512-ln41eihm5YXIY043vBrrHfn94SIBlqOWmoROhsMVTSXGh0QahKGy77tfEywQ7v3NywyxBBkGIfrWRHm0hsKtzA== + +"@parcel/watcher-darwin-x64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.4.1.tgz#1a3f69d9323eae4f1c61a5f480a59c478d2cb020" + integrity sha512-yrw81BRLjjtHyDu7J61oPuSoeYWR3lDElcPGJyOvIXmor6DEo7/G2u1o7I38cwlcoBHQFULqF6nesIX3tsEXMg== + +"@parcel/watcher-freebsd-x64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.4.1.tgz#0d67fef1609f90ba6a8a662bc76a55fc93706fc8" + integrity sha512-TJa3Pex/gX3CWIx/Co8k+ykNdDCLx+TuZj3f3h7eOjgpdKM+Mnix37RYsYU4LHhiYJz3DK5nFCCra81p6g050w== + +"@parcel/watcher-linux-arm-glibc@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.4.1.tgz#ce5b340da5829b8e546bd00f752ae5292e1c702d" + integrity sha512-4rVYDlsMEYfa537BRXxJ5UF4ddNwnr2/1O4MHM5PjI9cvV2qymvhwZSFgXqbS8YoTk5i/JR0L0JDs69BUn45YA== + +"@parcel/watcher-linux-arm64-glibc@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.4.1.tgz#6d7c00dde6d40608f9554e73998db11b2b1ff7c7" + integrity sha512-BJ7mH985OADVLpbrzCLgrJ3TOpiZggE9FMblfO65PlOCdG++xJpKUJ0Aol74ZUIYfb8WsRlUdgrZxKkz3zXWYA== + +"@parcel/watcher-linux-arm64-musl@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.4.1.tgz#bd39bc71015f08a4a31a47cd89c236b9d6a7f635" + integrity sha512-p4Xb7JGq3MLgAfYhslU2SjoV9G0kI0Xry0kuxeG/41UfpjHGOhv7UoUDAz/jb1u2elbhazy4rRBL8PegPJFBhA== + +"@parcel/watcher-linux-x64-glibc@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.4.1.tgz#0ce29966b082fb6cdd3de44f2f74057eef2c9e39" + integrity sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg== + +"@parcel/watcher-linux-x64-musl@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.4.1.tgz#d2ebbf60e407170bb647cd6e447f4f2bab19ad16" + integrity sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ== + +"@parcel/watcher-wasm@^2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-wasm/-/watcher-wasm-2.4.1.tgz#c4353e4fdb96ee14389856f7f6f6d21b7dcef9e1" + integrity sha512-/ZR0RxqxU/xxDGzbzosMjh4W6NdYFMqq2nvo2b8SLi7rsl/4jkL8S5stIikorNkdR50oVDvqb/3JT05WM+CRRA== + dependencies: + is-glob "^4.0.3" + micromatch "^4.0.5" + napi-wasm "^1.1.0" + +"@parcel/watcher-win32-arm64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.4.1.tgz#eb4deef37e80f0b5e2f215dd6d7a6d40a85f8adc" + integrity sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg== + +"@parcel/watcher-win32-ia32@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.4.1.tgz#94fbd4b497be39fd5c8c71ba05436927842c9df7" + integrity sha512-maNRit5QQV2kgHFSYwftmPBxiuK5u4DXjbXx7q6eKjq5dsLXZ4FJiVvlcw35QXzk0KrUecJmuVFbj4uV9oYrcw== + +"@parcel/watcher-win32-x64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.4.1.tgz#4bf920912f67cae5f2d264f58df81abfea68dadf" + integrity sha512-+DvS92F9ezicfswqrvIRM2njcYJbd5mb9CUgtrHCHmvn7pPPa+nMDRu1o1bYYz/l5IB2NVGNJWiH7h1E58IF2A== + +"@parcel/watcher@^2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.4.1.tgz#a50275151a1bb110879c6123589dba90c19f1bf8" + integrity sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA== + dependencies: + detect-libc "^1.0.3" + is-glob "^4.0.3" + micromatch "^4.0.5" + node-addon-api "^7.0.0" + optionalDependencies: + "@parcel/watcher-android-arm64" "2.4.1" + "@parcel/watcher-darwin-arm64" "2.4.1" + "@parcel/watcher-darwin-x64" "2.4.1" + "@parcel/watcher-freebsd-x64" "2.4.1" + "@parcel/watcher-linux-arm-glibc" "2.4.1" + "@parcel/watcher-linux-arm64-glibc" "2.4.1" + "@parcel/watcher-linux-arm64-musl" "2.4.1" + "@parcel/watcher-linux-x64-glibc" "2.4.1" + "@parcel/watcher-linux-x64-musl" "2.4.1" + "@parcel/watcher-win32-arm64" "2.4.1" + "@parcel/watcher-win32-ia32" "2.4.1" + "@parcel/watcher-win32-x64" "2.4.1" + "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" @@ -882,6 +1265,28 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== +"@scure/base@^1.1.3", "@scure/base@~1.1.6": + version "1.1.7" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.7.tgz#fe973311a5c6267846aa131bc72e96c5d40d2b30" + integrity sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g== + +"@scure/bip32@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.4.0.tgz#4e1f1e196abedcef395b33b9674a042524e20d67" + integrity sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg== + dependencies: + "@noble/curves" "~1.4.0" + "@noble/hashes" "~1.4.0" + "@scure/base" "~1.1.6" + +"@scure/bip39@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.3.0.tgz#0f258c16823ddd00739461ac31398b4e7d6a18c3" + integrity sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ== + dependencies: + "@noble/hashes" "~1.4.0" + "@scure/base" "~1.1.6" + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -901,6 +1306,140 @@ dependencies: "@sinonjs/commons" "^3.0.0" +"@stablelib/aead@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/aead/-/aead-1.0.1.tgz#c4b1106df9c23d1b867eb9b276d8f42d5fc4c0c3" + integrity sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg== + +"@stablelib/binary@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/binary/-/binary-1.0.1.tgz#c5900b94368baf00f811da5bdb1610963dfddf7f" + integrity sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q== + dependencies: + "@stablelib/int" "^1.0.1" + +"@stablelib/bytes@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/bytes/-/bytes-1.0.1.tgz#0f4aa7b03df3080b878c7dea927d01f42d6a20d8" + integrity sha512-Kre4Y4kdwuqL8BR2E9hV/R5sOrUj6NanZaZis0V6lX5yzqC3hBuVSDXUIBqQv/sCpmuWRiHLwqiT1pqqjuBXoQ== + +"@stablelib/chacha20poly1305@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/chacha20poly1305/-/chacha20poly1305-1.0.1.tgz#de6b18e283a9cb9b7530d8767f99cde1fec4c2ee" + integrity sha512-MmViqnqHd1ymwjOQfghRKw2R/jMIGT3wySN7cthjXCBdO+qErNPUBnRzqNpnvIwg7JBCg3LdeCZZO4de/yEhVA== + dependencies: + "@stablelib/aead" "^1.0.1" + "@stablelib/binary" "^1.0.1" + "@stablelib/chacha" "^1.0.1" + "@stablelib/constant-time" "^1.0.1" + "@stablelib/poly1305" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/chacha@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/chacha/-/chacha-1.0.1.tgz#deccfac95083e30600c3f92803a3a1a4fa761371" + integrity sha512-Pmlrswzr0pBzDofdFuVe1q7KdsHKhhU24e8gkEwnTGOmlC7PADzLVxGdn2PoNVBBabdg0l/IfLKg6sHAbTQugg== + dependencies: + "@stablelib/binary" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/constant-time@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/constant-time/-/constant-time-1.0.1.tgz#bde361465e1cf7b9753061b77e376b0ca4c77e35" + integrity sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg== + +"@stablelib/ed25519@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@stablelib/ed25519/-/ed25519-1.0.3.tgz#f8fdeb6f77114897c887bb6a3138d659d3f35996" + integrity sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg== + dependencies: + "@stablelib/random" "^1.0.2" + "@stablelib/sha512" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/hash@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/hash/-/hash-1.0.1.tgz#3c944403ff2239fad8ebb9015e33e98444058bc5" + integrity sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg== + +"@stablelib/hkdf@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/hkdf/-/hkdf-1.0.1.tgz#b4efd47fd56fb43c6a13e8775a54b354f028d98d" + integrity sha512-SBEHYE16ZXlHuaW5RcGk533YlBj4grMeg5TooN80W3NpcHRtLZLLXvKyX0qcRFxf+BGDobJLnwkvgEwHIDBR6g== + dependencies: + "@stablelib/hash" "^1.0.1" + "@stablelib/hmac" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/hmac@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/hmac/-/hmac-1.0.1.tgz#3d4c1b8cf194cb05d28155f0eed8a299620a07ec" + integrity sha512-V2APD9NSnhVpV/QMYgCVMIYKiYG6LSqw1S65wxVoirhU/51ACio6D4yDVSwMzuTJXWZoVHbDdINioBwKy5kVmA== + dependencies: + "@stablelib/constant-time" "^1.0.1" + "@stablelib/hash" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/int@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/int/-/int-1.0.1.tgz#75928cc25d59d73d75ae361f02128588c15fd008" + integrity sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w== + +"@stablelib/keyagreement@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/keyagreement/-/keyagreement-1.0.1.tgz#4612efb0a30989deb437cd352cee637ca41fc50f" + integrity sha512-VKL6xBwgJnI6l1jKrBAfn265cspaWBPAPEc62VBQrWHLqVgNRE09gQ/AnOEyKUWrrqfD+xSQ3u42gJjLDdMDQg== + dependencies: + "@stablelib/bytes" "^1.0.1" + +"@stablelib/poly1305@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/poly1305/-/poly1305-1.0.1.tgz#93bfb836c9384685d33d70080718deae4ddef1dc" + integrity sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA== + dependencies: + "@stablelib/constant-time" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" + integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== + dependencies: + "@stablelib/binary" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/sha256@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/sha256/-/sha256-1.0.1.tgz#77b6675b67f9b0ea081d2e31bda4866297a3ae4f" + integrity sha512-GIIH3e6KH+91FqGV42Kcj71Uefd/QEe7Dy42sBTeqppXV95ggCcxLTk39bEr+lZfJmp+ghsR07J++ORkRELsBQ== + dependencies: + "@stablelib/binary" "^1.0.1" + "@stablelib/hash" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/sha512@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/sha512/-/sha512-1.0.1.tgz#6da700c901c2c0ceacbd3ae122a38ac57c72145f" + integrity sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw== + dependencies: + "@stablelib/binary" "^1.0.1" + "@stablelib/hash" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/wipe@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" + integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== + +"@stablelib/x25519@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.3.tgz#13c8174f774ea9f3e5e42213cbf9fc68a3c7b7fd" + integrity sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw== + dependencies: + "@stablelib/keyagreement" "^1.0.1" + "@stablelib/random" "^1.0.2" + "@stablelib/wipe" "^1.0.1" + "@swc/core-darwin-arm64@1.5.28": version "1.5.28" resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.5.28.tgz#b0b5a163c6bb34468f1a2307c040811e73a1b253" @@ -1109,6 +1648,14 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.34.tgz#10964ba0dee6ac4cd462e2795b6bebd407303433" integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== +"@types/node-fetch@^2.5.10": + version "2.6.11" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24" + integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g== + dependencies: + "@types/node" "*" + form-data "^4.0.0" + "@types/node@*", "@types/node@>=13.7.0": version "20.14.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.2.tgz#a5f4d2bcb4b6a87bffcaa717718c5a0f208f4a18" @@ -1248,6 +1795,209 @@ "@typescript-eslint/types" "7.8.0" eslint-visitor-keys "^3.4.3" +"@walletconnect/core@2.12.2": + version "2.12.2" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.12.2.tgz#12bd568b90daed876e58ebcc098c12843a3321e6" + integrity sha512-7Adv/b3pp9F42BkvReaaM4KS8NEvlkS7AMtwO3uF/o6aRMKtcfTJq9/jgWdKJh4RP8pPRTRFjCw6XQ/RZtT4aQ== + dependencies: + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-provider" "1.0.13" + "@walletconnect/jsonrpc-types" "1.0.3" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/jsonrpc-ws-connection" "1.0.14" + "@walletconnect/keyvaluestorage" "^1.1.1" + "@walletconnect/logger" "^2.1.2" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/relay-auth" "^1.0.4" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.12.2" + "@walletconnect/utils" "2.12.2" + events "^3.3.0" + isomorphic-unfetch "3.1.0" + lodash.isequal "4.5.0" + uint8arrays "^3.1.0" + +"@walletconnect/environment@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@walletconnect/environment/-/environment-1.0.1.tgz#1d7f82f0009ab821a2ba5ad5e5a7b8ae3b214cd7" + integrity sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg== + dependencies: + tslib "1.14.1" + +"@walletconnect/events@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@walletconnect/events/-/events-1.0.1.tgz#2b5f9c7202019e229d7ccae1369a9e86bda7816c" + integrity sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ== + dependencies: + keyvaluestorage-interface "^1.0.0" + tslib "1.14.1" + +"@walletconnect/heartbeat@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz#afaa3a53232ae182d7c9cff41c1084472d8f32e9" + integrity sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q== + dependencies: + "@walletconnect/events" "^1.0.1" + "@walletconnect/time" "^1.0.2" + tslib "1.14.1" + +"@walletconnect/jsonrpc-provider@1.0.13": + version "1.0.13" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz#9a74da648d015e1fffc745f0c7d629457f53648b" + integrity sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/safe-json" "^1.0.2" + tslib "1.14.1" + +"@walletconnect/jsonrpc-types@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz#65e3b77046f1a7fa8347ae02bc1b841abe6f290c" + integrity sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw== + dependencies: + keyvaluestorage-interface "^1.0.0" + tslib "1.14.1" + +"@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.4.tgz#ce1a667d79eadf2a2d9d002c152ceb68739c230c" + integrity sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ== + dependencies: + events "^3.3.0" + keyvaluestorage-interface "^1.0.0" + +"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz#82d0cc6a5d6ff0ecc277cb35f71402c91ad48d72" + integrity sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw== + dependencies: + "@walletconnect/environment" "^1.0.1" + "@walletconnect/jsonrpc-types" "^1.0.3" + tslib "1.14.1" + +"@walletconnect/jsonrpc-ws-connection@1.0.14": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz#eec700e74766c7887de2bd76c91a0206628732aa" + integrity sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.2" + events "^3.3.0" + ws "^7.5.1" + +"@walletconnect/keyvaluestorage@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz#dd2caddabfbaf80f6b8993a0704d8b83115a1842" + integrity sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA== + dependencies: + "@walletconnect/safe-json" "^1.0.1" + idb-keyval "^6.2.1" + unstorage "^1.9.0" + +"@walletconnect/logger@^2.0.1", "@walletconnect/logger@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@walletconnect/logger/-/logger-2.1.2.tgz#813c9af61b96323a99f16c10089bfeb525e2a272" + integrity sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw== + dependencies: + "@walletconnect/safe-json" "^1.0.2" + pino "7.11.0" + +"@walletconnect/relay-api@^1.0.9": + version "1.0.10" + resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.10.tgz#5aef3cd07c21582b968136179aa75849dcc65499" + integrity sha512-tqrdd4zU9VBNqUaXXQASaexklv6A54yEyQQEXYOCr+Jz8Ket0dmPBDyg19LVSNUN2cipAghQc45/KVmfFJ0cYw== + dependencies: + "@walletconnect/jsonrpc-types" "^1.0.2" + +"@walletconnect/relay-auth@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@walletconnect/relay-auth/-/relay-auth-1.0.4.tgz#0b5c55c9aa3b0ef61f526ce679f3ff8a5c4c2c7c" + integrity sha512-kKJcS6+WxYq5kshpPaxGHdwf5y98ZwbfuS4EE/NkQzqrDFm5Cj+dP8LofzWvjrrLkZq7Afy7WrQMXdLy8Sx7HQ== + dependencies: + "@stablelib/ed25519" "^1.0.2" + "@stablelib/random" "^1.0.1" + "@walletconnect/safe-json" "^1.0.1" + "@walletconnect/time" "^1.0.2" + tslib "1.14.1" + uint8arrays "^3.0.0" + +"@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@walletconnect/safe-json/-/safe-json-1.0.2.tgz#7237e5ca48046e4476154e503c6d3c914126fa77" + integrity sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA== + dependencies: + tslib "1.14.1" + +"@walletconnect/sign-client@2.12.2": + version "2.12.2" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.12.2.tgz#10cddcba3740f726149c33ef1a9040a808d65e08" + integrity sha512-cM0ualXj6nVvLqS4BDNRk+ZWR+lubcsz/IHreH+3wYrQ2sV+C0fN6ctrd7MMGZss0C0qacWCx0pm62ZBuoKvqA== + dependencies: + "@walletconnect/core" "2.12.2" + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/logger" "^2.1.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.12.2" + "@walletconnect/utils" "2.12.2" + events "^3.3.0" + +"@walletconnect/time@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@walletconnect/time/-/time-1.0.2.tgz#6c5888b835750ecb4299d28eecc5e72c6d336523" + integrity sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g== + dependencies: + tslib "1.14.1" + +"@walletconnect/types@2.12.2": + version "2.12.2" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.12.2.tgz#8b64a2015a0a96972d28acb2ff317a9a994abfdb" + integrity sha512-9CmwTlPbrFTzayTL9q7xM7s3KTJkS6kYFtH2m1/fHFgALs6pIUjf1qAx1TF2E4tv7SEzLAIzU4NqgYUt2vWXTg== + dependencies: + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-types" "1.0.3" + "@walletconnect/keyvaluestorage" "^1.1.1" + "@walletconnect/logger" "^2.0.1" + events "^3.3.0" + +"@walletconnect/utils@2.12.2": + version "2.12.2" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.12.2.tgz#a2c349d4effef7c1c5e72e74a5483d8dfbb10918" + integrity sha512-zf50HeS3SfoLv1N9GPl2IXTZ9TsXfet4usVAsZmX9P6/Xzq7d/7QakjVQCHH/Wk1O9XkcsfeoZoUhRxoMJ5uJw== + dependencies: + "@stablelib/chacha20poly1305" "1.0.1" + "@stablelib/hkdf" "1.0.1" + "@stablelib/random" "^1.0.2" + "@stablelib/sha256" "1.0.1" + "@stablelib/x25519" "^1.0.3" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.12.2" + "@walletconnect/window-getters" "^1.0.1" + "@walletconnect/window-metadata" "^1.0.1" + detect-browser "5.3.0" + query-string "7.1.3" + uint8arrays "^3.1.0" + +"@walletconnect/window-getters@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@walletconnect/window-getters/-/window-getters-1.0.1.tgz#f36d1c72558a7f6b87ecc4451fc8bd44f63cbbdc" + integrity sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q== + dependencies: + tslib "1.14.1" + +"@walletconnect/window-metadata@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz#2124f75447b7e989e4e4e1581d55d25bc75f7be5" + integrity sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA== + dependencies: + "@walletconnect/window-getters" "^1.0.1" + tslib "1.14.1" + "@xmldom/xmldom@^0.8.3": version "0.8.10" resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz#a1337ca426aa61cef9fe15b5b28e340a72f6fa99" @@ -1263,6 +2013,13 @@ abab@^2.0.6: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + acorn-globals@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" @@ -1349,7 +2106,7 @@ ansi-styles@^6.1.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== -anymatch@^3.0.3, anymatch@~3.1.2: +anymatch@^3.0.3, anymatch@^3.1.3, anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== @@ -1445,6 +2202,11 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== +atomic-sleep@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" + integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== + available-typed-arrays@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" @@ -1529,6 +2291,11 @@ babel-preset-jest@^29.6.3: babel-plugin-jest-hoist "^29.6.3" babel-preset-current-node-syntax "^1.0.0" +backslash@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/backslash/-/backslash-0.2.0.tgz#6c3c1fce7e7e714ccfc10fd74f0f73410677375f" + integrity sha512-Avs+8FUZ1HF/VFP4YWwHQZSGzRPm37ukU1JQYQWijuHhtXdOuAzcZ8PcAzfIw898a8PyBzdn+RtnKA6MzW0X2A== + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1549,6 +2316,11 @@ bech32@^2.0.0: resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== +bignumber.js@9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" + integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== + bignumber.js@9.x, bignumber.js@^9.0.0: version "9.1.2" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" @@ -1634,7 +2406,7 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@6.0.3: +buffer@6.0.3, buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -1708,7 +2480,7 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -chokidar@^3.4.2, chokidar@^3.5.3: +chokidar@^3.4.2, chokidar@^3.5.3, chokidar@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== @@ -1728,6 +2500,13 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== +citty@^0.1.5, citty@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/citty/-/citty-0.1.6.tgz#0f7904da1ed4625e1a9ea7e0fa780981aab7c5e4" + integrity sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ== + dependencies: + consola "^3.2.3" + cjs-module-lexer@^1.0.0: version "1.3.1" resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c" @@ -1750,6 +2529,15 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== +clipboardy@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-4.0.0.tgz#e73ced93a76d19dd379ebf1f297565426dffdca1" + integrity sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w== + dependencies: + execa "^8.0.1" + is-wsl "^3.1.0" + is64bit "^2.0.0" + cliui@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" @@ -1815,16 +2603,36 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +confbox@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.7.tgz#ccfc0a2bcae36a84838e83a3b7f770fb17d6c579" + integrity sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA== + +consola@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" + integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== + convert-source-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== +cookie-es@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/cookie-es/-/cookie-es-1.1.0.tgz#68f8d9f48aeb5a534f3896f80e792760d3d20def" + integrity sha512-L2rLOcK0wzWSfSDA33YR+PUHDG10a8px7rUHKWbGLP4YfbsMed2KFUw5fczvDPbT98DDe3LEzviswl810apTEw== + cookie@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== +crc-32@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== + create-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" @@ -1847,6 +2655,11 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +crossws@^0.2.0, crossws@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/crossws/-/crossws-0.2.4.tgz#82a8b518bff1018ab1d21ced9e35ffbe1681ad03" + integrity sha512-DAxroI2uSOgUKLz00NX6A8U/8EE3SZHmIND+10jkVSaypvyt57J5JEOxAQOL6lQxyzi/wZbTIwssU1uy69h5Vg== + cssom@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" @@ -1919,6 +2732,11 @@ decimal.js@^10.4.2: resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== +decode-uri-component@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== + dedent@^1.0.0: version "1.5.3" resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" @@ -1959,11 +2777,31 @@ define-properties@^1.2.0, define-properties@^1.2.1: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +defu@^6.1.3, defu@^6.1.4: + version "6.1.4" + resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.4.tgz#4e0c9cf9ff68fe5f3d7f2765cc1a012dfdcb0479" + integrity sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg== + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== +destr@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/destr/-/destr-2.0.3.tgz#7f9e97cb3d16dbdca7be52aca1644ce402cfe449" + integrity sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ== + +detect-browser@5.3.0, detect-browser@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/detect-browser/-/detect-browser-5.3.0.tgz#9705ef2bddf46072d0f7265a1fe300e36fe7ceca" + integrity sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w== + +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -1995,6 +2833,16 @@ domexception@^4.0.0: dependencies: webidl-conversions "^7.0.0" +duplexify@^4.1.2: + version "4.1.3" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.3.tgz#a07e1c0d0a2c001158563d32592ba58bddb0236f" + integrity sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA== + dependencies: + end-of-stream "^1.4.1" + inherits "^2.0.3" + readable-stream "^3.1.1" + stream-shift "^1.0.2" + electron-to-chromium@^1.4.796: version "1.4.798" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.798.tgz#6a3fcab2edc1e66e3883466f6b4b8944323c0164" @@ -2010,6 +2858,13 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +end-of-stream@^1.4.1: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + enhanced-resolve@^5.12.0: version "5.17.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz#d037603789dd9555b89aaec7eb78845c49089bc5" @@ -2389,6 +3244,21 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +ethereum-cryptography@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz#58f2810f8e020aecb97de8c8c76147600b0b8ccf" + integrity sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg== + dependencies: + "@noble/curves" "1.4.2" + "@noble/hashes" "1.4.0" + "@scure/bip32" "1.4.0" + "@scure/bip39" "1.3.0" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -2409,6 +3279,21 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +execa@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^8.0.1" + human-signals "^5.0.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^4.1.0" + strip-final-newline "^3.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -2425,6 +3310,14 @@ expect@^29.0.0, expect@^29.7.0: jest-message-util "^29.7.0" jest-util "^29.7.0" +extension-port-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extension-port-stream/-/extension-port-stream-3.0.0.tgz#00a7185fe2322708a36ed24843c81bd754925fef" + integrity sha512-an2S5quJMiy5bnZKEf6AkfH/7r8CzHvhchU40gxN+OM6HPhe7Z9T1FUychcf2M9PpPOO0Hf7BAEfJkw2TDIBDw== + dependencies: + readable-stream "^3.6.2 || ^4.4.2" + webextension-polyfill ">=0.10.0 <1.0" + external-editor@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" @@ -2465,6 +3358,16 @@ fast-levenshtein@^2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-redact@^3.0.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.5.0.tgz#e9ea02f7e57d0cd8438180083e93077e496285e4" + integrity sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A== + +fast-safe-stringify@^2.0.6: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + fastq@^1.6.0: version "1.17.1" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" @@ -2500,6 +3403,11 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" +filter-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== + find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -2614,11 +3522,21 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== +get-port-please@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/get-port-please/-/get-port-please-3.1.2.tgz#502795e56217128e4183025c89a48c71652f4e49" + integrity sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ== + get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-stream@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + get-symbol-description@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" @@ -2724,6 +3642,22 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== +h3@^1.10.2, h3@^1.11.1: + version "1.12.0" + resolved "https://registry.yarnpkg.com/h3/-/h3-1.12.0.tgz#9d7f05f08a997d263e484b02436cb027df3026d8" + integrity sha512-Zi/CcNeWBXDrFNlV0hUBJQR9F7a96RjMeAZweW/ZWkR9fuXrMcvKnSA63f/zZ9l0GgQOZDVHGvXivNN9PWOwhA== + dependencies: + cookie-es "^1.1.0" + crossws "^0.2.4" + defu "^6.1.4" + destr "^2.0.3" + iron-webcrypto "^1.1.1" + ohash "^1.1.3" + radix3 "^1.1.2" + ufo "^1.5.3" + uncrypto "^0.1.3" + unenv "^1.9.0" + has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" @@ -2796,6 +3730,11 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" +http-shutdown@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/http-shutdown/-/http-shutdown-1.2.2.tgz#41bc78fc767637c4c95179bc492f312c0ae64c5f" + integrity sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw== + https-proxy-agent@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -2809,6 +3748,11 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +human-signals@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== + iconv-lite@0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" @@ -2823,6 +3767,11 @@ iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +idb-keyval@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/idb-keyval/-/idb-keyval-6.2.1.tgz#94516d625346d16f56f3b33855da11bfded2db33" + integrity sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg== + ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -2902,6 +3851,11 @@ internal-slot@^1.0.7: hasown "^2.0.0" side-channel "^1.0.4" +iron-webcrypto@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz#aa60ff2aa10550630f4c0b11fd2442becdb35a6f" + integrity sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg== + is-arguments@^1.0.4: version "1.1.1" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" @@ -2976,6 +3930,11 @@ is-date-object@^1.0.1: dependencies: has-tostringtag "^1.0.0" +is-docker@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" + integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -3005,6 +3964,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-inside-container@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" + integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== + dependencies: + is-docker "^3.0.0" + is-interactive@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" @@ -3062,6 +4028,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -3095,6 +4066,20 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +is-wsl@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" + integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== + dependencies: + is-inside-container "^1.0.0" + +is64bit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is64bit/-/is64bit-2.0.0.tgz#198c627cbcb198bbec402251f88e5e1a51236c07" + integrity sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw== + dependencies: + system-architecture "^0.1.0" + isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -3113,6 +4098,14 @@ isomorphic-fetch@^3.0.0: node-fetch "^2.6.1" whatwg-fetch "^3.4.1" +isomorphic-unfetch@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" + integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== + dependencies: + node-fetch "^2.6.1" + unfetch "^4.2.0" + istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" @@ -3547,6 +4540,11 @@ jest@29.7.0: import-local "^3.0.2" jest-cli "^29.7.0" +jiti@^1.21.0: + version "1.21.6" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268" + integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w== + js-levenshtein@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" @@ -3621,6 +4619,13 @@ json-buffer@3.0.1: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== +json-duplicate-key-handle@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-duplicate-key-handle/-/json-duplicate-key-handle-1.0.0.tgz#0678bd17822d23d8c0d0958b43011875fa37f363" + integrity sha512-OLIxL+UpfwUsqcLX3i6Z51ChTou/Vje+6bSeGUSubj96dF/SfjObDprLy++ZXYH07KITuEzsXS7PX7e/BGf4jw== + dependencies: + backslash "^0.2.0" + json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" @@ -3669,6 +4674,11 @@ keyv@^4.5.4: dependencies: json-buffer "3.0.1" +keyvaluestorage-interface@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz#13ebdf71f5284ad54be94bd1ad9ed79adad515ff" + integrity sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g== + kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -3692,6 +4702,30 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +listhen@^1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/listhen/-/listhen-1.7.2.tgz#66b81740692269d5d8cafdc475020f2fc51afbae" + integrity sha512-7/HamOm5YD9Wb7CFgAZkKgVPA96WwhcTQoqtm2VTZGVbVVn3IWKRBTgrU7cchA3Q8k9iCsG8Osoi9GX4JsGM9g== + dependencies: + "@parcel/watcher" "^2.4.1" + "@parcel/watcher-wasm" "^2.4.1" + citty "^0.1.6" + clipboardy "^4.0.0" + consola "^3.2.3" + crossws "^0.2.0" + defu "^6.1.4" + get-port-please "^3.1.2" + h3 "^1.10.2" + http-shutdown "^1.2.2" + jiti "^1.21.0" + mlly "^1.6.1" + node-forge "^1.3.1" + pathe "^1.1.2" + std-env "^3.7.0" + ufo "^1.4.0" + untun "^0.1.3" + uqr "^0.1.2" + locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -3706,6 +4740,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.isequal@4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + lodash.memoize@4.x: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -3782,7 +4821,12 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -micromatch@^4.0.4: +micro-ftch@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/micro-ftch/-/micro-ftch-0.3.1.tgz#6cb83388de4c1f279a034fb0cf96dfc050853c5f" + integrity sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg== + +micromatch@^4.0.4, micromatch@^4.0.5: version "4.0.7" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== @@ -3802,11 +4846,21 @@ mime-types@^2.1.12: dependencies: mime-db "1.52.0" +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -3831,6 +4885,21 @@ minimist@^1.2.0, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== +mlly@^1.6.1, mlly@^1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.1.tgz#e0336429bb0731b6a8e887b438cbdae522c8f32f" + integrity sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA== + dependencies: + acorn "^8.11.3" + pathe "^1.1.2" + pkg-types "^1.1.1" + ufo "^1.5.3" + +mri@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" + integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -3866,6 +4935,11 @@ msw@1.3.1: type-fest "^2.19.0" yargs "^17.3.1" +multiformats@^9.4.2: + version "9.9.0" + resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" + integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== + mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" @@ -3881,6 +4955,11 @@ nanoassert@^1.0.0: resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-1.1.0.tgz#4f3152e09540fde28c76f44b19bbcd1d5a42478d" integrity sha512-C40jQ3NzfkP53NsO8kEOFd79p4b9kDXQMwgiY1z8ZwrDZgUyom0AHwGegF4Dm99L+YoYhuaB0ceerUcXmqr1rQ== +napi-wasm@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.0.tgz#bbe617823765ae9c1bc12ff5942370eae7b2ba4e" + integrity sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -3891,6 +4970,16 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== +node-addon-api@^7.0.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.1.tgz#1aba6693b0f255258a049d621329329322aad558" + integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ== + +node-fetch-native@^1.6.1, node-fetch-native@^1.6.2, node-fetch-native@^1.6.3: + version "1.6.4" + resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz#679fc8fd8111266d47d7e72c379f1bed9acff06e" + integrity sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ== + node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" @@ -3898,6 +4987,11 @@ node-fetch@^2.6.1, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" +node-forge@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + node-gyp-build@^4.2.0: version "4.8.1" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.1.tgz#976d3ad905e71b76086f4f0b0d3637fe79b6cda5" @@ -3925,6 +5019,13 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npm-run-path@^5.1.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.3.0.tgz#e23353d0ebb9317f174e93417e4a4d82d0249e9f" + integrity sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ== + dependencies: + path-key "^4.0.0" + nwsapi@^2.2.2: version "2.2.10" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.10.tgz#0b77a68e21a0b483db70b11fad055906e867cda8" @@ -3978,7 +5079,26 @@ object.values@^1.1.7: define-properties "^1.2.1" es-object-atoms "^1.0.0" -once@^1.3.0: +ofetch@^1.3.3: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ofetch/-/ofetch-1.3.4.tgz#7ea65ced3c592ec2b9906975ae3fe1d26a56f635" + integrity sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw== + dependencies: + destr "^2.0.3" + node-fetch-native "^1.6.3" + ufo "^1.5.3" + +ohash@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.3.tgz#f12c3c50bfe7271ce3fd1097d42568122ccdcf07" + integrity sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw== + +on-exit-leak-free@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz#b39c9e3bf7690d890f4861558b0d7b90a442d209" + integrity sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg== + +once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== @@ -3992,6 +5112,13 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + optionator@^0.9.3: version "0.9.4" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" @@ -4101,6 +5228,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -4124,6 +5256,11 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pathe@^1.1.1, pathe@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== + picocolors@^1.0.0, picocolors@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" @@ -4134,6 +5271,36 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pino-abstract-transport@v0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz#4b54348d8f73713bfd14e3dc44228739aa13d9c0" + integrity sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ== + dependencies: + duplexify "^4.1.2" + split2 "^4.0.0" + +pino-std-serializers@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz#1791ccd2539c091ae49ce9993205e2cd5dbba1e2" + integrity sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q== + +pino@7.11.0: + version "7.11.0" + resolved "https://registry.yarnpkg.com/pino/-/pino-7.11.0.tgz#0f0ea5c4683dc91388081d44bff10c83125066f6" + integrity sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg== + dependencies: + atomic-sleep "^1.0.0" + fast-redact "^3.0.0" + on-exit-leak-free "^0.2.0" + pino-abstract-transport v0.5.0 + pino-std-serializers "^4.0.0" + process-warning "^1.0.0" + quick-format-unescaped "^4.0.3" + real-require "^0.1.0" + safe-stable-stringify "^2.1.0" + sonic-boom "^2.2.1" + thread-stream "^0.15.1" + pirates@^4.0.4: version "4.0.6" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" @@ -4146,6 +5313,20 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pkg-types@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.1.3.tgz#161bb1242b21daf7795036803f28e30222e476e3" + integrity sha512-+JrgthZG6m3ckicaOB74TwQ+tBWsFl3qVQg7mN8ulwSOElJ7gBhKzj2VkCPnZ4NlF6kEquYU+RIYNVAvzd54UA== + dependencies: + confbox "^0.1.7" + mlly "^1.7.1" + pathe "^1.1.2" + +platform@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" + integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== + plimit-lit@^1.2.6: version "1.6.1" resolved "https://registry.yarnpkg.com/plimit-lit/-/plimit-lit-1.6.1.tgz#a34594671b31ee8e93c72d505dfb6852eb72374a" @@ -4153,6 +5334,11 @@ plimit-lit@^1.2.6: dependencies: queue-lit "^1.5.1" +pony-cause@^2.1.10: + version "2.1.11" + resolved "https://registry.yarnpkg.com/pony-cause/-/pony-cause-2.1.11.tgz#d69a20aaccdb3bdb8f74dd59e5c68d8e6772e4bd" + integrity sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg== + possible-typed-array-names@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" @@ -4184,6 +5370,16 @@ pretty-format@^29.0.0, pretty-format@^29.7.0: ansi-styles "^5.0.0" react-is "^18.0.0" +process-warning@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-1.0.0.tgz#980a0b25dc38cd6034181be4b7726d89066b4616" + integrity sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + prompts@^2.0.1: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" @@ -4192,6 +5388,24 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" +protobufjs@7.2.4: + version "7.2.4" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.4.tgz#3fc1ec0cdc89dd91aef9ba6037ba07408485c3ae" + integrity sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/node" ">=13.7.0" + long "^5.0.0" + protobufjs@^7.3.0: version "7.3.0" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.3.0.tgz#a32ec0422c039798c41a0700306a6e305b9cb32c" @@ -4230,6 +5444,13 @@ pure-rand@^6.0.0: resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== +qs@6.10.3: + version "6.10.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" + integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== + dependencies: + side-channel "^1.0.4" + qs@6.11.2: version "6.11.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" @@ -4237,6 +5458,16 @@ qs@6.11.2: dependencies: side-channel "^1.0.4" +query-string@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328" + integrity sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg== + dependencies: + decode-uri-component "^0.2.2" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + querystringify@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" @@ -4252,6 +5483,16 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +quick-format-unescaped@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" + integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== + +radix3@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/radix3/-/radix3-1.1.2.tgz#fd27d2af3896c6bf4bcdfab6427c69c2afc69ec0" + integrity sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA== + react-is@^18.0.0: version "18.3.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" @@ -4264,7 +5505,7 @@ react@^18.3.1: dependencies: loose-envify "^1.1.0" -readable-stream@^3.4.0, readable-stream@^3.6.0: +readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0, readable-stream@^3.6.2: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -4273,6 +5514,17 @@ readable-stream@^3.4.0, readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" +"readable-stream@^3.6.2 || ^4.4.2": + version "4.5.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" + integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + string_decoder "^1.3.0" + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -4280,6 +5532,11 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +real-require@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.1.0.tgz#736ac214caa20632847b7ca8c1056a0767df9381" + integrity sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg== + regexp.prototype.flags@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" @@ -4373,7 +5630,14 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^7.5.5: +rxjs@6: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + +rxjs@^7.5.5, rxjs@^7.8.1: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== @@ -4404,6 +5668,11 @@ safe-regex-test@^1.0.3: es-errors "^1.3.0" is-regex "^1.1.4" +safe-stable-stringify@^2.1.0: + version "2.4.3" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886" + integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== + "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -4421,7 +5690,7 @@ semver@^6.1.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: +semver@^7.3.5, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== @@ -4480,7 +5749,7 @@ signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -signal-exit@^4.0.1: +signal-exit@^4.0.1, signal-exit@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== @@ -4495,6 +5764,13 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +sonic-boom@^2.2.1: + version "2.8.0" + resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-2.8.0.tgz#c1def62a77425090e6ad7516aad8eb402e047611" + integrity sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg== + dependencies: + atomic-sleep "^1.0.0" + source-map-support@0.5.13: version "0.5.13" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" @@ -4508,6 +5784,16 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== + +split2@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" + integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -4520,6 +5806,16 @@ stack-utils@^2.0.3: dependencies: escape-string-regexp "^2.0.0" +std-env@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" + integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== + +stream-shift@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" + integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== + strict-event-emitter@^0.2.4: version "0.2.8" resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.2.8.tgz#b4e768927c67273c14c13d20e19d5e6c934b47ca" @@ -4532,6 +5828,11 @@ strict-event-emitter@^0.4.3: resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.4.6.tgz#ff347c8162b3e931e3ff5f02cfce6772c3b07eb3" integrity sha512-12KWeb+wixJohmnwNFerbyiBrAlq5qJLwIt38etRtKtmmHyDSoGlIqFE9wx+4IwG0aDjI7GV8tc8ZccjWZZtTg== +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== + string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -4586,7 +5887,7 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -string_decoder@^1.1.1: +string_decoder@^1.1.1, string_decoder@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -4629,6 +5930,11 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -4673,6 +5979,11 @@ synckit@^0.8.6: "@pkgr/core" "^0.1.0" tslib "^2.6.2" +system-architecture@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/system-architecture/-/system-architecture-0.1.0.tgz#71012b3ac141427d97c67c56bc7921af6bff122d" + integrity sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA== + tapable@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" @@ -4692,6 +6003,13 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +thread-stream@^0.15.1: + version "0.15.2" + resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-0.15.2.tgz#fb95ad87d2f1e28f07116eb23d85aba3bc0425f4" + integrity sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA== + dependencies: + real-require "^0.1.0" + through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -4784,6 +6102,11 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" +tslib@1.14.1, tslib@^1.9.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + tslib@^2.1.0, tslib@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" @@ -4860,6 +6183,18 @@ typescript@^5.4.5: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== +ufo@^1.4.0, ufo@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" + integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== + +uint8arrays@^3.0.0, uint8arrays@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" + integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== + dependencies: + multiformats "^9.4.2" + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -4870,16 +6205,62 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +uncrypto@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/uncrypto/-/uncrypto-0.1.3.tgz#e1288d609226f2d02d8d69ee861fa20d8348ef2b" + integrity sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q== + undici-types@~5.26.4: version "5.26.5" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +unenv@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/unenv/-/unenv-1.9.0.tgz#469502ae85be1bd3a6aa60f810972b1a904ca312" + integrity sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g== + dependencies: + consola "^3.2.3" + defu "^6.1.3" + mime "^3.0.0" + node-fetch-native "^1.6.1" + pathe "^1.1.1" + +unfetch@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" + integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== + universalify@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== +unstorage@^1.9.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.10.2.tgz#fb7590ada8b30e83be9318f85100158b02a76dae" + integrity sha512-cULBcwDqrS8UhlIysUJs2Dk0Mmt8h7B0E6mtR+relW9nZvsf/u4SkAYyNliPiPW7XtFNb5u3IUMkxGxFTTRTgQ== + dependencies: + anymatch "^3.1.3" + chokidar "^3.6.0" + destr "^2.0.3" + h3 "^1.11.1" + listhen "^1.7.2" + lru-cache "^10.2.0" + mri "^1.2.0" + node-fetch-native "^1.6.2" + ofetch "^1.3.3" + ufo "^1.4.0" + +untun@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/untun/-/untun-0.1.3.tgz#5d10dee37a3a5737ff03d158be877dae0a0e58a6" + integrity sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ== + dependencies: + citty "^0.1.5" + consola "^3.2.3" + pathe "^1.1.1" + update-browserslist-db@^1.0.16: version "1.0.16" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" @@ -4888,6 +6269,11 @@ update-browserslist-db@^1.0.16: escalade "^3.1.2" picocolors "^1.0.1" +uqr@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/uqr/-/uqr-0.1.2.tgz#5c6cd5dcff9581f9bb35b982cb89e2c483a41d7d" + integrity sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA== + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -4924,6 +6310,11 @@ util@^0.12.3: is-typed-array "^1.1.3" which-typed-array "^1.1.2" +uuid@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + v8-to-istanbul@^9.0.1: version "9.2.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" @@ -4963,6 +6354,16 @@ web-encoding@^1.1.5: optionalDependencies: "@zxing/text-encoding" "0.9.0" +"webextension-polyfill@>=0.10.0 <1.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.12.0.tgz#f62c57d2cd42524e9fbdcee494c034cae34a3d69" + integrity sha512-97TBmpoWJEE+3nFBQ4VocyCdLKfw54rFaJ6EVQYLBCXqCIpLSZkwGgASpv4oPt9gdKCJ80RJlcmNzNn008Ag6Q== + +webextension-polyfill@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz#ccb28101c910ba8cf955f7e6a263e662d744dbb8" + integrity sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g== + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -5041,6 +6442,7 @@ word-wrap@^1.2.5: integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: + name wrap-ansi-cjs version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -5080,6 +6482,11 @@ write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" +ws@^7.5.1: + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + ws@^8.11.0: version "8.17.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" From df8e98a9a38012cc2d6e09b715bc9983b1995a25 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Wed, 17 Jul 2024 11:05:48 +0300 Subject: [PATCH 04/17] Add auto logout middleware (#9) Add logout --- src/core/ProviderFactory.ts | 6 +- src/core/methods/account/getIsLoggedIn.ts | 4 +- src/core/methods/account/getWebviewToken.ts | 9 + src/core/methods/login/webWalletLogin.ts | 2 +- src/core/methods/logout/logout.ts | 72 ++++++ src/core/providers/accountProvider.ts | 2 +- src/core/providers/helpers/utils.ts | 2 +- src/lib/sdkWebWalletCrossWindowProvider.ts | 1 + src/storage/index.ts | 4 + src/storage/local.ts | 80 ++++++ src/storage/session.ts | 57 +++++ .../actions/sharedActions/sharedActions.ts | 11 +- src/store/middleware/applyMiddleware.ts | 7 + src/store/middleware/index.ts | 1 + src/store/middleware/logoutMiddleware.ts | 46 ++++ src/store/selectors/accountSelectors.ts | 6 + src/store/store.ts | 3 + src/utils/window/addOriginToLocationPath.ts | 15 -- src/utils/window/getIsAuthRoute.ts | 32 +++ src/utils/window/index.ts | 2 +- src/utils/window/isWindowAvailable copy.ts | 2 + src/utils/window/matchPath.ts | 240 ++++++++++++++++++ .../tests/addOriginToLocationPath.test.ts | 67 ----- src/utils/window/tests/getIsAuthRoute.test.ts | 37 +++ 24 files changed, 607 insertions(+), 101 deletions(-) create mode 100644 src/core/methods/account/getWebviewToken.ts create mode 100644 src/core/methods/logout/logout.ts create mode 100644 src/lib/sdkWebWalletCrossWindowProvider.ts create mode 100644 src/storage/index.ts create mode 100644 src/storage/local.ts create mode 100644 src/storage/session.ts create mode 100644 src/store/middleware/applyMiddleware.ts create mode 100644 src/store/middleware/index.ts create mode 100644 src/store/middleware/logoutMiddleware.ts delete mode 100644 src/utils/window/addOriginToLocationPath.ts create mode 100644 src/utils/window/getIsAuthRoute.ts create mode 100644 src/utils/window/isWindowAvailable copy.ts create mode 100644 src/utils/window/matchPath.ts delete mode 100644 src/utils/window/tests/addOriginToLocationPath.test.ts create mode 100644 src/utils/window/tests/getIsAuthRoute.test.ts diff --git a/src/core/ProviderFactory.ts b/src/core/ProviderFactory.ts index e71dc41..66791ca 100644 --- a/src/core/ProviderFactory.ts +++ b/src/core/ProviderFactory.ts @@ -1,9 +1,5 @@ import { Transaction } from '@multiversx/sdk-core'; -import { - // IframeProvider, - CrossWindowProvider - // ICrossWindowWalletAccount -} from '@multiversx/sdk-web-wallet-cross-window-provider/out/CrossWindowProvider/CrossWindowProvider'; +import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; export interface IProvider { login: (options?: { token?: string }) => Promise; diff --git a/src/core/methods/account/getIsLoggedIn.ts b/src/core/methods/account/getIsLoggedIn.ts index 110d470..9316522 100644 --- a/src/core/methods/account/getIsLoggedIn.ts +++ b/src/core/methods/account/getIsLoggedIn.ts @@ -1,5 +1,7 @@ +import { isLoggedInSelector } from 'store/selectors/accountSelectors'; import { getAddress } from './getAddress'; +import { getState } from 'store/store'; export function getIsLoggedIn() { - return Boolean(getAddress()); + return isLoggedInSelector(getState()); } diff --git a/src/core/methods/account/getWebviewToken.ts b/src/core/methods/account/getWebviewToken.ts new file mode 100644 index 0000000..fcaa009 --- /dev/null +++ b/src/core/methods/account/getWebviewToken.ts @@ -0,0 +1,9 @@ +import { getWindowLocation } from 'utils/window/getWindowLocation'; + +export const getWebviewToken = () => { + const { search } = getWindowLocation(); + const urlSearchParams = new URLSearchParams(search) as any; + const searchParams = Object.fromEntries(urlSearchParams); + + return searchParams?.accessToken; +}; diff --git a/src/core/methods/login/webWalletLogin.ts b/src/core/methods/login/webWalletLogin.ts index d556e9f..8875f0e 100644 --- a/src/core/methods/login/webWalletLogin.ts +++ b/src/core/methods/login/webWalletLogin.ts @@ -1,6 +1,5 @@ import { LoginMethodsEnum } from 'types/enums.types'; import { OnProviderLoginType } from 'types/login.types'; -import { CrossWindowProvider } from '@multiversx/sdk-web-wallet-cross-window-provider/out/CrossWindowProvider/CrossWindowProvider'; import { getWindowLocation } from 'utils/window/getWindowLocation'; import { getLoginService } from './helpers/getLoginService'; import { networkSelector } from 'store/selectors'; @@ -14,6 +13,7 @@ import { loginAction } from 'store/actions/sharedActions'; import { setAccount } from 'store/actions/account/accountActions'; import { getLatestNonce } from 'utils/account/getLatestNonce'; import { AccountType } from 'types/account.types'; +import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; export const webWalletLogin = async ({ token: tokenToSign, diff --git a/src/core/methods/logout/logout.ts b/src/core/methods/logout/logout.ts new file mode 100644 index 0000000..acfd0db --- /dev/null +++ b/src/core/methods/logout/logout.ts @@ -0,0 +1,72 @@ +import { storage } from 'storage'; +import { localStorageKeys } from 'storage/local'; +import { LoginMethodsEnum } from 'types'; +import { getAddress } from '../account/getAddress'; +import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; +import { logoutAction } from 'store/actions/sharedActions/sharedActions'; +import { getWebviewToken } from '../account/getWebviewToken'; +import { getAccountProvider } from 'core/providers/accountProvider'; +import { getProviderType } from 'core/providers/helpers/utils'; + +const broadcastLogoutAcrossTabs = (address: string) => { + const storedData = storage.local?.getItem(localStorageKeys.logoutEvent); + const { data } = storedData ? JSON.parse(storedData) : { data: address }; + + if (address !== data) { + return; + } + + storage.local.setItem({ + key: localStorageKeys.logoutEvent, + data: address, + expires: 0 + }); + + storage.local.removeItem(localStorageKeys.logoutEvent); +}; + +export type LogoutPropsType = { + shouldAttemptReLogin?: boolean; + shouldBroadcastLogoutAcrossTabs?: boolean; + /* + * Only used for web-wallet crossWindow login + */ + hasConsentPopup?: boolean; +}; + +export async function logout( + shouldAttemptReLogin = Boolean(getWebviewToken()), + options = { + shouldBroadcastLogoutAcrossTabs: true, + hasConsentPopup: false + } +) { + let address = getAddress(); + const provider = getAccountProvider(); + const providerType = getProviderType(provider); + + if (shouldAttemptReLogin && provider?.relogin != null) { + return provider.relogin(); + } + + if (options.shouldBroadcastLogoutAcrossTabs) { + broadcastLogoutAcrossTabs(address); + } + + try { + logoutAction(); + + if ( + options.hasConsentPopup && + providerType === LoginMethodsEnum.crossWindow + ) { + (provider as unknown as CrossWindowProvider).setShouldShowConsentPopup( + true + ); + } + + await provider.logout(); + } catch (err) { + console.error('Logging out error:', err); + } +} diff --git a/src/core/providers/accountProvider.ts b/src/core/providers/accountProvider.ts index f73a536..44f1ba1 100644 --- a/src/core/providers/accountProvider.ts +++ b/src/core/providers/accountProvider.ts @@ -1,6 +1,6 @@ -import { CrossWindowProvider } from '@multiversx/sdk-web-wallet-cross-window-provider/out/CrossWindowProvider/CrossWindowProvider'; import { IDappProvider } from 'types/dappProvider.types'; import { emptyProvider } from './helpers/emptyProvider'; +import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; export type ProvidersType = IDappProvider | CrossWindowProvider; diff --git a/src/core/providers/helpers/utils.ts b/src/core/providers/helpers/utils.ts index 843c1d1..db82443 100644 --- a/src/core/providers/helpers/utils.ts +++ b/src/core/providers/helpers/utils.ts @@ -2,11 +2,11 @@ import { ExtensionProvider } from '@multiversx/sdk-extension-provider'; import { HWProvider } from '@multiversx/sdk-hw-provider'; import { MetamaskProvider } from '@multiversx/sdk-metamask-provider/out/metamaskProvider'; import { OperaProvider } from '@multiversx/sdk-opera-provider'; -import { CrossWindowProvider } from '@multiversx/sdk-web-wallet-cross-window-provider/out/CrossWindowProvider/CrossWindowProvider'; import { WalletProvider } from '@multiversx/sdk-web-wallet-provider'; import { LoginMethodsEnum } from 'types/enums.types'; import { WalletConnectV2Provider } from 'utils/walletconnect/__sdkWalletconnectProvider'; import { EmptyProvider } from './emptyProvider'; +import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; export const getProviderType = ( provider?: TProvider | null diff --git a/src/lib/sdkWebWalletCrossWindowProvider.ts b/src/lib/sdkWebWalletCrossWindowProvider.ts new file mode 100644 index 0000000..7bf0706 --- /dev/null +++ b/src/lib/sdkWebWalletCrossWindowProvider.ts @@ -0,0 +1 @@ +export { CrossWindowProvider } from '@multiversx/sdk-web-wallet-cross-window-provider/out/CrossWindowProvider/CrossWindowProvider'; diff --git a/src/storage/index.ts b/src/storage/index.ts new file mode 100644 index 0000000..86b177a --- /dev/null +++ b/src/storage/index.ts @@ -0,0 +1,4 @@ +import * as local from './local'; +import * as session from './session'; + +export const storage = { session, local }; diff --git a/src/storage/local.ts b/src/storage/local.ts new file mode 100644 index 0000000..ac027e5 --- /dev/null +++ b/src/storage/local.ts @@ -0,0 +1,80 @@ +import { getUnixTimestamp } from 'utils/dateTime'; + +export const localStorageKeys = { + loginExpiresAt: 'sdk-dapp-login-expires-at', + logoutEvent: 'sdk-dapp-logout-event' +} as const; + +type LocalValueType = keyof typeof localStorageKeys; +type LocalKeyType = typeof localStorageKeys[LocalValueType]; + +type ExpiresType = number | false; + +const hasLocalStorage = typeof localStorage !== 'undefined'; + +export const setItem = ({ + key, + data, + expires +}: { + key: LocalKeyType; + data: any; + expires: ExpiresType; +}) => { + if (!hasLocalStorage) { + return; + } + localStorage.setItem( + String(key), + JSON.stringify({ + expires, + data + }) + ); +}; + +export const getItem = (key: LocalKeyType): any => { + if (!hasLocalStorage) { + return; + } + const item = localStorage.getItem(String(key)); + if (!item) { + return null; + } + + const deserializedItem = JSON.parse(item); + if (!deserializedItem) { + return null; + } + + if ( + !deserializedItem.hasOwnProperty('expires') || + !deserializedItem.hasOwnProperty('data') + ) { + return null; + } + + const expired = getUnixTimestamp() >= deserializedItem.expires; + if (expired) { + localStorage.removeItem(String(key)); + return null; + } + + return deserializedItem.data; +}; + +export const removeItem = (key: LocalKeyType) => { + if (!hasLocalStorage) { + return; + } + + localStorage.removeItem(String(key)); +}; + +export const clear = () => { + if (!hasLocalStorage) { + return; + } + + localStorage.clear(); +}; diff --git a/src/storage/session.ts b/src/storage/session.ts new file mode 100644 index 0000000..a4d1c83 --- /dev/null +++ b/src/storage/session.ts @@ -0,0 +1,57 @@ +export type SessionKeyType = 'address' | 'shard' | 'toasts' | 'toastProgress'; +type ExpiresType = number | false; + +export interface SetItemType { + key: SessionKeyType; + data: any; + expires: ExpiresType; +} + +export const setItem = ({ key, data, expires }: SetItemType) => { + sessionStorage.setItem( + String(key), + JSON.stringify({ + expires, + data + }) + ); +}; + +export const getItem = (key: SessionKeyType): any => { + const item = sessionStorage.getItem(String(key)); + if (!item) { + return null; + } + + const deserializedItem = JSON.parse(item); + if (!deserializedItem) { + return null; + } + + if ( + !deserializedItem.hasOwnProperty('expires') || + !deserializedItem.hasOwnProperty('data') + ) { + return null; + } + + const expired = Date.now() >= deserializedItem.expires; + if (expired) { + sessionStorage.removeItem(String(key)); + return null; + } + + return deserializedItem.data; +}; + +export const removeItem = (key: SessionKeyType) => + sessionStorage.removeItem(String(key)); + +export const clear = () => sessionStorage.clear(); + +export const storage = { + setItem, + getItem, + removeItem, + clear +}; diff --git a/src/store/actions/sharedActions/sharedActions.ts b/src/store/actions/sharedActions/sharedActions.ts index 1fdd747..594c4e1 100644 --- a/src/store/actions/sharedActions/sharedActions.ts +++ b/src/store/actions/sharedActions/sharedActions.ts @@ -1,15 +1,9 @@ import { Address } from '@multiversx/sdk-core/out'; -import { initialState as initialAccountState } from 'store/slices/account/accountSlice'; -import { initialState as initialLoginInfoState } from 'store/slices/loginInfo/loginInfoSlice'; import { store } from '../../store'; import { LoginMethodsEnum } from 'types/enums.types'; +import { resetStore } from 'store/middleware/logoutMiddleware'; -export const logoutAction = () => - store.setState((store) => { - store.account = initialAccountState; - store.loginInfo = initialLoginInfoState; - }); - +export const logoutAction = () => store.setState(resetStore); export interface LoginActionPayloadType { address: string; loginMethod: LoginMethodsEnum; @@ -20,5 +14,4 @@ export const loginAction = ({ address, loginMethod }: LoginActionPayloadType) => account.address = address; account.publicKey = new Address(address).hex(); loginInfo.loginMethod = loginMethod; - // setLoginExpiresAt(getNewLoginExpiresTimestamp()); }); diff --git a/src/store/middleware/applyMiddleware.ts b/src/store/middleware/applyMiddleware.ts new file mode 100644 index 0000000..ab0d0dd --- /dev/null +++ b/src/store/middleware/applyMiddleware.ts @@ -0,0 +1,7 @@ +import { StoreType } from '../store.types'; +import { StoreApi } from 'zustand/vanilla'; +import { logoutMiddleware } from './logoutMiddleware'; + +export const applyMiddleware = (store: StoreApi) => { + store.subscribe(logoutMiddleware); +}; diff --git a/src/store/middleware/index.ts b/src/store/middleware/index.ts new file mode 100644 index 0000000..6f49a51 --- /dev/null +++ b/src/store/middleware/index.ts @@ -0,0 +1 @@ +export * from './applyMiddleware'; diff --git a/src/store/middleware/logoutMiddleware.ts b/src/store/middleware/logoutMiddleware.ts new file mode 100644 index 0000000..303703c --- /dev/null +++ b/src/store/middleware/logoutMiddleware.ts @@ -0,0 +1,46 @@ +import { storage } from 'storage'; +import { WritableDraft } from 'immer'; +import { initialState as initialAccountState } from 'store/slices/account/accountSlice'; +import { initialState as initialLoginInfoState } from 'store/slices/loginInfo/loginInfoSlice'; +import { localStorageKeys } from 'storage/local'; +import { isLoggedInSelector } from 'store/selectors'; +import { StoreType } from '../store.types'; + +export const resetStore = (store: WritableDraft) => { + store.account = initialAccountState; + store.loginInfo = initialLoginInfoState; +}; + +export function getNewLoginExpiresTimestamp() { + return new Date().setHours(new Date().getHours() + 24); +} + +export function setLoginExpiresAt(expiresAt: number) { + storage.local.setItem({ + key: localStorageKeys.loginExpiresAt, + data: expiresAt, + expires: expiresAt + }); +} + +export const logoutMiddleware = (newStore: StoreType) => { + const isLoggedIn = isLoggedInSelector(newStore); + const loginTimestamp = storage.local.getItem(localStorageKeys.loginExpiresAt); + + if (!isLoggedIn) { + return; + } + + if (loginTimestamp == null) { + setLoginExpiresAt(getNewLoginExpiresTimestamp()); + return; + } + + const now = Date.now(); + const isExpired = loginTimestamp - now < 0; + + if (isExpired) { + // logout + resetStore(newStore); + } +}; diff --git a/src/store/selectors/accountSelectors.ts b/src/store/selectors/accountSelectors.ts index 75d6fbf..a592554 100644 --- a/src/store/selectors/accountSelectors.ts +++ b/src/store/selectors/accountSelectors.ts @@ -8,3 +8,9 @@ export const addressSelector = ({ account: { address } }: StoreType) => address; export const accountNonceSelector = (store: StoreType) => accountSelector(store)?.nonce || 0; + +export const isLoggedInSelector = (store: StoreType) => { + const address = addressSelector(store); + const account = accountSelector(store); + return Boolean(address && account?.address === address); +}; diff --git a/src/store/store.ts b/src/store/store.ts index 5600c50..8f963f3 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -6,6 +6,7 @@ import { accountSlice } from './slices/account/accountSlice'; import { createBoundedUseStore } from './createBoundedStore'; import { loginInfoSlice } from './slices/loginInfo'; import { StoreType } from './store.types'; +import { applyMiddleware } from './middleware/applyMiddleware'; export type MutatorsIn = [ ['zustand/devtools', never], @@ -35,6 +36,8 @@ export const store = createStore( ) ); +applyMiddleware(store); + export const getState = () => store.getState(); export const useStore = createBoundedUseStore(store); diff --git a/src/utils/window/addOriginToLocationPath.ts b/src/utils/window/addOriginToLocationPath.ts deleted file mode 100644 index ffd408d..0000000 --- a/src/utils/window/addOriginToLocationPath.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { getWindowLocation } from './getWindowLocation'; - -export const addOriginToLocationPath = (path = '') => { - const location = getWindowLocation(); - const isHrefUrl = path.startsWith('http') || path.startsWith('www.'); - - const shouldNotChangePath = - !location.origin || path.startsWith(location.origin) || isHrefUrl; - - if (shouldNotChangePath) { - return path; - } - - return `${location.origin}/${path.replace('/', '')}`; -}; diff --git a/src/utils/window/getIsAuthRoute.ts b/src/utils/window/getIsAuthRoute.ts new file mode 100644 index 0000000..e74cc4c --- /dev/null +++ b/src/utils/window/getIsAuthRoute.ts @@ -0,0 +1,32 @@ +import { matchPath } from './matchPath'; + +/** + * Allow detecting authenticated routes with pattern parameters + * @example + * routes = [ + * { + path: "/users/:id", + component: () => <>, + authenticatedRoute: true + } +] + */ +export const getIsAuthRoute = < + T extends { + authenticatedRoute: boolean; + path: string; + } +>( + routes: Array, + pathname: string +) => { + const authenticatedRoutes = routes.filter(({ authenticatedRoute }) => + Boolean(authenticatedRoute) + ); + + const isOnAuthenticatedRoute = authenticatedRoutes.some( + ({ path }) => matchPath(path, pathname) !== null + ); + + return isOnAuthenticatedRoute; +}; diff --git a/src/utils/window/index.ts b/src/utils/window/index.ts index c4aeeff..698dd2e 100644 --- a/src/utils/window/index.ts +++ b/src/utils/window/index.ts @@ -1,6 +1,6 @@ -export * from './addOriginToLocationPath'; export * from './getDefaultCallbackUrl'; export * from './getWindowLocation'; export * from './isWindowAvailable'; export * from './sanitizeCallbackUrl'; export * from './buildUrlParams'; +export * from './getIsAuthRoute'; diff --git a/src/utils/window/isWindowAvailable copy.ts b/src/utils/window/isWindowAvailable copy.ts new file mode 100644 index 0000000..46354e5 --- /dev/null +++ b/src/utils/window/isWindowAvailable copy.ts @@ -0,0 +1,2 @@ +export const isWindowAvailable = () => + typeof window != 'undefined' && typeof window?.location != 'undefined'; diff --git a/src/utils/window/matchPath.ts b/src/utils/window/matchPath.ts new file mode 100644 index 0000000..33641c0 --- /dev/null +++ b/src/utils/window/matchPath.ts @@ -0,0 +1,240 @@ +// credits go to: https://remix.run +// sourcecode: https://raw.githubusercontent.com/remix-run/react-router/6b44e99f0b659428ce2ec8d5098e90c7fddda2c5/packages/react-router/lib/router.ts + +function warning(cond: any, message: string): void { + if (!cond) { + // eslint-disable-next-line no-console + if (typeof console !== 'undefined') console.warn(message); + + try { + // Welcome to debugging React Router! + // + // This error is thrown as a convenience so you can more easily + // find the source for a warning that appears in the console by + // enabling "pause on exceptions" in your JavaScript debugger. + throw new Error(message); + // eslint-disable-next-line no-empty + } catch (e) {} + } +} + +type ParamParseFailed = { failed: true }; + +type ParamParseSegment = + // Check here if there exists a forward slash in the string. + // eslint-disable-next-line prettier/prettier + Segment extends `${infer LeftSegment}/${infer RightSegment}` + ? // If there is a forward slash, then attempt to parse each side of the + // forward slash. + ParamParseSegment extends infer LeftResult + ? ParamParseSegment extends infer RightResult + ? LeftResult extends string + ? // If the left side is successfully parsed as a param, then check if + // the right side can be successfully parsed as well. If both sides + // can be parsed, then the result is a union of the two sides + // (read: "foo" | "bar"). + RightResult extends string + ? LeftResult | RightResult + : LeftResult + : // If the left side is not successfully parsed as a param, then check + // if only the right side can be successfully parse as a param. If it + // can, then the result is just right, else it's a failure. + RightResult extends string + ? RightResult + : ParamParseFailed + : ParamParseFailed + : // If the left side didn't parse into a param, then just check the right + // side. + ParamParseSegment extends infer RightResult + ? RightResult extends string + ? RightResult + : ParamParseFailed + : ParamParseFailed + : // If there's no forward slash, then check if this segment starts with a + // colon. If it does, then this is a dynamic segment, so the result is + // just the remainder of the string. Otherwise, it's a failure. + Segment extends `:${infer Remaining}` + ? Remaining + : ParamParseFailed; + +// Attempt to parse the given string segment. If it fails, then just return the +// plain string type as a default fallback. Otherwise return the union of the +// parsed string literals that were referenced as dynamic segments in the route. +type ParamParseKey = + ParamParseSegment extends string + ? ParamParseSegment + : string; + +/** + * The parameters that were parsed from the URL path. + */ +type Params = { + readonly [key in Key]: string | undefined; +}; + +/** + * A PathPattern is used to match on some portion of a URL pathname. + */ +interface PathPattern { + /** + * A string to match against a URL pathname. May contain `:id`-style segments + * to indicate placeholders for dynamic parameters. May also end with `/*` to + * indicate matching the rest of the URL pathname. + */ + path: Path; + /** + * Should be `true` if the static portions of the `path` should be matched in + * the same case. + */ + caseSensitive?: boolean; + /** + * Should be `true` if this pattern should match the entire URL pathname. + */ + end?: boolean; +} + +/** + * A PathMatch contains info about how a PathPattern matched on a URL pathname. + */ +interface PathMatch { + /** + * The names and values of dynamic parameters in the URL. + */ + params: Params; + /** + * The portion of the URL pathname that was matched. + */ + pathname: string; + /** + * The portion of the URL pathname that was matched before child routes. + */ + pathnameBase: string; + /** + * The pattern that was used to match. + */ + pattern: PathPattern; +} + +type Mutable = { + -readonly [P in keyof T]: T[P]; +}; + +/** + * Performs pattern matching on a URL pathname and returns information about + * the match. + * + * @see https://reactrouter.com/docs/en/v6/utils/match-path + */ +export function matchPath< + ParamKey extends ParamParseKey, + Path extends string +>( + pattern: PathPattern | Path, + pathname: string +): PathMatch | null { + if (typeof pattern === 'string') { + pattern = { path: pattern, caseSensitive: false, end: true }; + } + + const [matcher, paramNames] = compilePath( + pattern.path, + pattern.caseSensitive, + pattern.end + ); + + const match = pathname.match(matcher); + if (!match) return null; + + const matchedPathname = match[0]; + let pathnameBase = matchedPathname.replace(/(.)\/+$/, '$1'); + const captureGroups = match.slice(1); + const params: Params = paramNames.reduce>( + (memo, paramName, index) => { + // We need to compute the pathnameBase here using the raw splat value + // instead of using params["*"] later because it will be decoded then + if (paramName === '*') { + const splatValue = captureGroups[index] || ''; + pathnameBase = matchedPathname + .slice(0, matchedPathname.length - splatValue.length) + .replace(/(.)\/+$/, '$1'); + } + + memo[paramName] = safelyDecodeURIComponent( + captureGroups[index] || '', + paramName + ); + return memo; + }, + {} + ); + + return { + params, + pathname: matchedPathname, + pathnameBase, + pattern + }; +} + +function compilePath( + path: string, + caseSensitive = false, + end = true +): [RegExp, string[]] { + warning( + path === '*' || !path.endsWith('*') || path.endsWith('/*'), + `Route path "${path}" will be treated as if it were ` + + `"${path.replace(/\*$/, '/*')}" because the \`*\` character must ` + + 'always follow a `/` in the pattern. To get rid of this warning, ' + + `please change the route path to "${path.replace(/\*$/, '/*')}".` + ); + + const paramNames: string[] = []; + let regexpSource = + '^' + + path + .replace(/\/*\*?$/, '') // Ignore trailing / and /*, we'll handle it below + .replace(/^\/*/, '/') // Make sure it has a leading / + .replace(/[\\.*+^$?{}|()[\]]/g, '\\$&') // Escape special regex chars + .replace(/:(\w+)/g, (_: string, paramName: string) => { + paramNames.push(paramName); + return '([^\\/]+)'; + }); + + if (path.endsWith('*')) { + paramNames.push('*'); + regexpSource += + path === '*' || path === '/*' + ? '(.*)$' // Already matched the initial /, just match the rest + : '(?:\\/(.+)|\\/*)$'; // Don't include the / in params["*"] + } else { + regexpSource += end + ? '\\/*$' // When matching to the end, ignore trailing slashes + : // Otherwise, match a word boundary or a proceeding /. The word boundary restricts + // parent routes to matching only their own words and nothing more, e.g. parent + // route "/home" should not match "/home2". + // Additionally, allow paths starting with `.`, `-`, `~`, and url-encoded entities, + // but do not consume the character in the matched path so they can match against + // nested paths. + '(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)'; + } + + const matcher = new RegExp(regexpSource, caseSensitive ? undefined : 'i'); + + return [matcher, paramNames]; +} + +function safelyDecodeURIComponent(value: string, paramName: string) { + try { + return decodeURIComponent(value); + } catch (error) { + warning( + false, + `The value for the URL param "${paramName}" will not be decoded because` + + ` the string "${value}" is a malformed URL segment. This is probably` + + ` due to a bad percent encoding (${error}).` + ); + + return value; + } +} diff --git a/src/utils/window/tests/addOriginToLocationPath.test.ts b/src/utils/window/tests/addOriginToLocationPath.test.ts deleted file mode 100644 index e61f23e..0000000 --- a/src/utils/window/tests/addOriginToLocationPath.test.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { addOriginToLocationPath } from '../addOriginToLocationPath'; - -let windowSpy: jest.SpyInstance; - -beforeEach(() => { - windowSpy = jest.spyOn(window, 'window', 'get'); -}); -afterEach(() => { - windowSpy.mockRestore(); -}); - -describe('Add window origin to pathname', () => { - it('should leave the path unchanged if origin is not available', () => { - windowSpy.mockImplementation(() => ({ - location: { - origin: '' - } - })); - - const path = addOriginToLocationPath('http://somesite/unlock'); - expect(path).toStrictEqual('http://somesite/unlock'); - }); - - it('should leave the path unchanged if it contains origin', () => { - windowSpy.mockImplementation(() => ({ - location: { - origin: 'https://multiversx.com' - } - })); - - const path = addOriginToLocationPath('http://somesite/unlock'); - expect(path).toStrictEqual('http://somesite/unlock'); - }); - - it('should leave the path unchanged if it contains the same origin as current one', () => { - windowSpy.mockImplementation(() => ({ - location: { - origin: 'http://somesite' - } - })); - - const path = addOriginToLocationPath('http://somesite/unlock'); - expect(path).toStrictEqual('http://somesite/unlock'); - }); - - it('should add the current origin to the path', () => { - windowSpy.mockImplementation(() => ({ - location: { - origin: 'https://multiversx.com' - } - })); - - const path = addOriginToLocationPath('/unlock'); - expect(path).toStrictEqual('https://multiversx.com/unlock'); - }); - - it('should return current origin if no parameter is specified', () => { - windowSpy.mockImplementation(() => ({ - location: { - origin: 'https://multiversx.com' - } - })); - - const path = addOriginToLocationPath(); - expect(path).toStrictEqual('https://multiversx.com/'); - }); -}); diff --git a/src/utils/window/tests/getIsAuthRoute.test.ts b/src/utils/window/tests/getIsAuthRoute.test.ts new file mode 100644 index 0000000..e2678b1 --- /dev/null +++ b/src/utils/window/tests/getIsAuthRoute.test.ts @@ -0,0 +1,37 @@ +import { getIsAuthRoute } from '../getIsAuthRoute'; + +const createRoutes = (path: string, authenticatedRoute = true) => [ + { + path, + component: () => null, + authenticatedRoute + } +]; + +describe('matchRoute', () => { + it('should return true for simple routes', () => { + const result = getIsAuthRoute(createRoutes('/home'), '/home'); + expect(result).toBe(true); + }); + it('should return true for pattern routes', () => { + const result = getIsAuthRoute( + createRoutes('/user/:id'), + '/user/first-name' + ); + expect(result).toBe(true); + }); + it('should return false for non-matching pattern routes', () => { + const result = getIsAuthRoute( + createRoutes('/user/:id'), + '/user/first-name/detail' + ); + expect(result).toBe(false); + }); + it('should return true for non-athenticated non-matching pattern routes', () => { + const result = getIsAuthRoute( + createRoutes('/user/:id', false), + '/user/first-name' + ); + expect(result).toBe(false); + }); +}); From fcb9486b3fc2f59412256655c9ed2f20c08d7f06 Mon Sep 17 00:00:00 2001 From: Ciprian Draghici Date: Wed, 17 Jul 2024 16:07:50 +0300 Subject: [PATCH 05/17] Add support for setting the storage dynamically (#8) * add support for setting the storage dynamically --- src/store/actions/account/accountActions.ts | 16 ++-- .../actions/loginInfo/loginInfoActions.ts | 18 ++--- src/store/actions/network/networkActions.ts | 6 +- .../actions/sharedActions/sharedActions.ts | 6 +- src/store/selectors/hooks/useSelector.ts | 11 +-- src/store/storage/inMemoryStorage.ts | 32 ++++++++ src/store/storage/index.ts | 2 + src/store/storage/storageCallback.ts | 5 ++ src/store/store.ts | 74 ++++++++++++++----- 9 files changed, 125 insertions(+), 45 deletions(-) create mode 100644 src/store/storage/inMemoryStorage.ts create mode 100644 src/store/storage/index.ts create mode 100644 src/store/storage/storageCallback.ts diff --git a/src/store/actions/account/accountActions.ts b/src/store/actions/account/accountActions.ts index da37b0e..29f0fc2 100644 --- a/src/store/actions/account/accountActions.ts +++ b/src/store/actions/account/accountActions.ts @@ -1,4 +1,4 @@ -import { store } from 'store/store'; +import { getStore } from 'store/store'; import { AccountType } from 'types/account.types'; import { emptyAccount } from 'store/slices/account/emptyAccount'; import { @@ -7,12 +7,12 @@ import { } from 'store/slices/account/account.types'; export const setAddress = (address: string) => - store.setState(({ account: state }) => { + getStore().setState(({ account: state }) => { state.address = address; }); export const setAccount = (account: AccountType) => - store.setState(({ account: state }) => { + getStore().setState(({ account: state }) => { const isSameAddress = state.address === account.address; state.accounts = { [state.address]: isSameAddress ? account : emptyAccount @@ -21,7 +21,7 @@ export const setAccount = (account: AccountType) => // TODO: check if needed export const setLedgerAccount = (ledgerAccount: LedgerAccountType | null) => - store.setState(({ account: state }) => { + getStore().setState(({ account: state }) => { state.ledgerAccount = ledgerAccount; }); @@ -33,7 +33,7 @@ export const updateLedgerAccount = ({ index: LedgerAccountType['index']; address: LedgerAccountType['address']; }) => - store.setState(({ account: state }) => { + getStore().setState(({ account: state }) => { if (state.ledgerAccount) { state.ledgerAccount.address = address; state.ledgerAccount.index = index; @@ -41,12 +41,12 @@ export const updateLedgerAccount = ({ }); export const setWalletConnectAccount = (walletConnectAccount: string | null) => - store.setState(({ account: state }) => { + getStore().setState(({ account: state }) => { state.walletConnectAccount = walletConnectAccount; }); export const setWebsocketEvent = (message: string) => - store.setState(({ account: state }) => { + getStore().setState(({ account: state }) => { state.websocketEvent = { timestamp: Date.now(), message @@ -54,7 +54,7 @@ export const setWebsocketEvent = (message: string) => }); export const setWebsocketBatchEvent = (data: BatchTransactionsWSResponseType) => - store.setState(({ account: state }) => { + getStore().setState(({ account: state }) => { state.websocketBatchEvent = { timestamp: Date.now(), data diff --git a/src/store/actions/loginInfo/loginInfoActions.ts b/src/store/actions/loginInfo/loginInfoActions.ts index e15d021..71d6a4f 100644 --- a/src/store/actions/loginInfo/loginInfoActions.ts +++ b/src/store/actions/loginInfo/loginInfoActions.ts @@ -1,52 +1,52 @@ import { LoginMethodsEnum } from 'types/enums.types'; -import { store } from '../../store'; import { TokenLoginType } from 'types/login.types'; import { LedgerLoginType, LoginInfoType, WalletConnectLoginType } from 'store/slices/loginInfo/loginInfo.types'; +import { getStore } from 'store/store'; export const setLoginMethod = (loginMethod: LoginMethodsEnum) => - store.setState(({ loginInfo: state }) => { + getStore().setState(({ loginInfo: state }) => { state.loginMethod = loginMethod; }); export const setTokenLogin = (tokenLogin: TokenLoginType) => - store.setState(({ loginInfo: state }) => { + getStore().setState(({ loginInfo: state }) => { state.tokenLogin = tokenLogin; }); export const setTokenLoginSignature = (signature: string) => - store.setState(({ loginInfo: state }) => { + getStore().setState(({ loginInfo: state }) => { if (state?.tokenLogin != null) { state.tokenLogin.signature = signature; } }); export const setWalletLogin = (walletLogin: LoginInfoType | null) => - store.setState(({ loginInfo: state }) => { + getStore().setState(({ loginInfo: state }) => { state.walletLogin = walletLogin; }); export const setWalletConnectLogin = ( walletConnectLogin: WalletConnectLoginType | null ) => - store.setState(({ loginInfo: state }) => { + getStore().setState(({ loginInfo: state }) => { state.walletConnectLogin = walletConnectLogin; }); export const setLedgerLogin = (ledgerLogin: LedgerLoginType | null) => - store.setState(({ loginInfo: state }) => { + getStore().setState(({ loginInfo: state }) => { state.ledgerLogin = ledgerLogin; }); export const setLogoutRoute = (logoutRoute: string | undefined) => - store.setState(({ loginInfo: state }) => { + getStore().setState(({ loginInfo: state }) => { state.logoutRoute = logoutRoute; }); export const setIsWalletConnectV2Initialized = (isInitialized: boolean) => - store.setState(({ loginInfo: state }) => { + getStore().setState(({ loginInfo: state }) => { state.isWalletConnectV2Initialized = isInitialized; }); diff --git a/src/store/actions/network/networkActions.ts b/src/store/actions/network/networkActions.ts index e76e57e..10a5f90 100644 --- a/src/store/actions/network/networkActions.ts +++ b/src/store/actions/network/networkActions.ts @@ -1,8 +1,8 @@ import { NetworkType } from 'types/network.types'; -import { store } from '../../store'; +import { getStore } from '../../store'; export const initializeNetworkConfig = (newNetwork: NetworkType) => - store.setState(({ network: state }) => { + getStore().setState(({ network: state }) => { const walletConnectV2RelayAddress = newNetwork.walletConnectV2RelayAddresses[ Math.floor( @@ -19,7 +19,7 @@ export const initializeNetworkConfig = (newNetwork: NetworkType) => }); export const setCustomWalletAddress = (customWalletAddress: string) => - store.setState(({ network: state }) => { + getStore().setState(({ network: state }) => { state.network.customWalletAddress = customWalletAddress; }); diff --git a/src/store/actions/sharedActions/sharedActions.ts b/src/store/actions/sharedActions/sharedActions.ts index 594c4e1..a45bf3b 100644 --- a/src/store/actions/sharedActions/sharedActions.ts +++ b/src/store/actions/sharedActions/sharedActions.ts @@ -1,16 +1,16 @@ import { Address } from '@multiversx/sdk-core/out'; -import { store } from '../../store'; +import { getStore } from '../../store'; import { LoginMethodsEnum } from 'types/enums.types'; import { resetStore } from 'store/middleware/logoutMiddleware'; -export const logoutAction = () => store.setState(resetStore); +export const logoutAction = () => getStore().setState(resetStore); export interface LoginActionPayloadType { address: string; loginMethod: LoginMethodsEnum; } export const loginAction = ({ address, loginMethod }: LoginActionPayloadType) => - store.setState(({ account, loginInfo }) => { + getStore().setState(({ account, loginInfo }) => { account.address = address; account.publicKey = new Address(address).hex(); loginInfo.loginMethod = loginMethod; diff --git a/src/store/selectors/hooks/useSelector.ts b/src/store/selectors/hooks/useSelector.ts index f51fd49..94ac5f3 100644 --- a/src/store/selectors/hooks/useSelector.ts +++ b/src/store/selectors/hooks/useSelector.ts @@ -1,10 +1,11 @@ import { StoreType } from 'store/store.types'; -import { useStore } from '../../store'; +import { getStoreHook } from '../../store'; -type ExtractState = S extends { getState: () => infer X } ? X : StoreType; +type ExtractState = S extends { getState: () => infer T } ? T : StoreType; -export const useSelector = ( +export function useSelector( selector: (state: ExtractState) => T -) => { +) { + const useStore = getStoreHook(); return useStore(selector); -}; +} diff --git a/src/store/storage/inMemoryStorage.ts b/src/store/storage/inMemoryStorage.ts new file mode 100644 index 0000000..00ebdd1 --- /dev/null +++ b/src/store/storage/inMemoryStorage.ts @@ -0,0 +1,32 @@ +interface InMemoryStorageType { + [key: string]: string; +} + +export class InMemoryStorage { + private storage: InMemoryStorageType = {}; + + setItem(key: string, value: string) { + this.storage[key] = value; + } + + getItem(key: string): string | null { + return this.storage.hasOwnProperty(key) ? this.storage[key] : null; + } + + removeItem(key: string) { + delete this.storage[key]; + } + + clear() { + this.storage = {} as Storage; + } + + get length() { + return Object.keys(this.storage).length; + } + + key(index: number): string | null { + const keys = Object.keys(this.storage); + return keys[index] || null; + } +} \ No newline at end of file diff --git a/src/store/storage/index.ts b/src/store/storage/index.ts new file mode 100644 index 0000000..763326c --- /dev/null +++ b/src/store/storage/index.ts @@ -0,0 +1,2 @@ +export * from "./storageCallback"; +export * from "./inMemoryStorage"; \ No newline at end of file diff --git a/src/store/storage/storageCallback.ts b/src/store/storage/storageCallback.ts new file mode 100644 index 0000000..e06fa77 --- /dev/null +++ b/src/store/storage/storageCallback.ts @@ -0,0 +1,5 @@ +import { StateStorage } from 'zustand/middleware'; + +export type StorageCallback = () => StateStorage; + +export const defaultStorageCallback: StorageCallback = () => localStorage; \ No newline at end of file diff --git a/src/store/store.ts b/src/store/store.ts index 8f963f3..0fdcbbc 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -1,6 +1,11 @@ import { createStore } from 'zustand/vanilla'; import { createJSONStorage, devtools, persist } from 'zustand/middleware'; import { immer } from 'zustand/middleware/immer'; +import { + InMemoryStorage, + defaultStorageCallback, + StorageCallback +} from './storage'; import { networkSlice } from './slices/network/networkSlice'; import { accountSlice } from './slices/account/accountSlice'; import { createBoundedUseStore } from './createBoundedStore'; @@ -20,24 +25,59 @@ export type MutatorsOut = [ ['zustand/immer', never] ]; -export const store = createStore( - devtools( - persist( - immer((...args) => ({ - network: networkSlice(...args), - account: accountSlice(...args), - loginInfo: loginInfoSlice(...args) - })), - { - name: 'sdk-dapp-store', - storage: createJSONStorage(() => localStorage) - } +export const createDAppStore = (getStorageCallback: StorageCallback) => { + const store = createStore( + devtools( + persist( + immer((...args) => ({ + network: networkSlice(...args), + account: accountSlice(...args), + loginInfo: loginInfoSlice(...args) + })), + { + name: 'sdk-dapp-store', + storage: createJSONStorage(getStorageCallback) + } + ) ) - ) -); + ); + applyMiddleware(store); -applyMiddleware(store); + return store; +}; -export const getState = () => store.getState(); +export type StoreApi = ReturnType; -export const useStore = createBoundedUseStore(store); +let store: StoreApi; + +export const getStore = () => { + if (!store) { + setDAppStore(createDAppStore(() => new InMemoryStorage())); + } + return store; +}; + +export const setDAppStore = (_store: StoreApi) => { + store = _store; +}; + +/** + * Initialize store with the preferred storage by passing a callback. + * Default storage is localStorage. + * You can pass your own storage. + * Call this function before using store, ideally before app bootstrapping. + * @param getStorageCallback + * @default () => localStorage + * @returns persistent store instance + * @example + * initStore(() => window.localStorage); + * initStore(() => window.sessionStorage); + * initStore(() => new InMemoryStorage()); + * */ +export const initStore = (getStorageCallback = defaultStorageCallback) => { + return setDAppStore(createDAppStore(getStorageCallback)); +}; + +export const getState = () => getStore().getState(); + +export const getStoreHook = () => createBoundedUseStore(getStore()); From cd8abf5656b403a86b5770ac6b4141863eea2998 Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Fri, 19 Jul 2024 18:17:58 +0300 Subject: [PATCH 06/17] fix node polyfills --- esbuild.js | 9 +- package.json | 2 + yarn.lock | 603 +++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 596 insertions(+), 18 deletions(-) diff --git a/esbuild.js b/esbuild.js index b7190b6..632b424 100644 --- a/esbuild.js +++ b/esbuild.js @@ -1,5 +1,8 @@ const esbuild = require('esbuild'); const glob = require('glob'); +const plugin = require('node-stdlib-browser/helpers/esbuild/plugin'); +const stdLibBrowser = require('node-stdlib-browser'); +const { nodeExternalsPlugin } = require('esbuild-node-externals'); /* The reason why we use esbuild instead of tsc is because esbuild can output .mjs files @@ -34,7 +37,11 @@ const executeBuild = () => global: 'global', process: 'process', Buffer: 'Buffer' - } + }, + plugins: [ + plugin(stdLibBrowser), + nodeExternalsPlugin(), + ] }) .then(() => { console.log( diff --git a/package.json b/package.json index 311ada7..aca857d 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "axios-mock-adapter": "^1.22.0", "bignumber.js": "9.x", "esbuild": "^0.21.1", + "esbuild-node-externals": "^1.14.0", "eslint": "9.1.1", "eslint-config-prettier": "9.1.0", "eslint-config-standard": "17.1.0", @@ -78,6 +79,7 @@ "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "msw": "1.3.1", + "node-stdlib-browser": "^1.2.0", "prettier": "3.2.5", "protobufjs": "^7.3.0", "react": "^18.3.1", diff --git a/yarn.lock b/yarn.lock index a765718..5276fa4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2197,6 +2197,26 @@ arraybuffer.prototype.slice@^1.0.3: is-array-buffer "^3.0.4" is-shared-array-buffer "^1.0.2" +asn1.js@^4.10.1: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +assert@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-2.1.0.tgz#6d92a238d05dc02e7427c881fb8be81c8448b2dd" + integrity sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw== + dependencies: + call-bind "^1.0.2" + is-nan "^1.3.2" + object-is "^1.1.5" + object.assign "^4.1.4" + util "^0.12.5" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -2355,6 +2375,16 @@ blake2b@2.1.3: blake2b-wasm "^1.1.0" nanoassert "^1.0.0" +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.0.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -2377,6 +2407,80 @@ braces@^3.0.3, braces@~3.0.2: dependencies: fill-range "^7.1.1" +brorand@^1.0.1, brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browser-resolve@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-2.0.0.tgz#99b7304cb392f8d73dba741bb2d7da28c6d7842b" + integrity sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ== + dependencies: + resolve "^1.17.0" + +browserify-aes@^1.0.4, browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0, browserify-rsa@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" + integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== + dependencies: + bn.js "^5.0.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.3.tgz#7afe4c01ec7ee59a89a558a4b75bd85ae62d4208" + integrity sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw== + dependencies: + bn.js "^5.2.1" + browserify-rsa "^4.1.0" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.5" + hash-base "~3.0" + inherits "^2.0.4" + parse-asn1 "^5.1.7" + readable-stream "^2.3.8" + safe-buffer "^5.2.1" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== + dependencies: + pako "~1.0.5" + browserslist@^4.22.2: version "4.23.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" @@ -2406,6 +2510,11 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== + buffer@6.0.3, buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -2414,7 +2523,7 @@ buffer@6.0.3, buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -buffer@^5.5.0: +buffer@^5.5.0, buffer@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -2422,7 +2531,12 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ== + +call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== @@ -2500,6 +2614,14 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + citty@^0.1.5, citty@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/citty/-/citty-0.1.6.tgz#0f7904da1ed4625e1a9ea7e0fa780981aab7c5e4" @@ -2613,6 +2735,16 @@ consola@^3.2.3: resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== +console-browserify@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" + integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ== + convert-source-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" @@ -2628,11 +2760,47 @@ cookie@^0.4.2: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + crc-32@^1.2.0: version "1.2.2" resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== +create-ecdh@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" + integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== + dependencies: + bn.js "^4.1.0" + elliptic "^6.5.3" + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + create-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" @@ -2646,6 +2814,11 @@ create-jest@^29.7.0: jest-util "^29.7.0" prompts "^2.0.1" +create-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -2660,6 +2833,23 @@ crossws@^0.2.0, crossws@^0.2.4: resolved "https://registry.yarnpkg.com/crossws/-/crossws-0.2.4.tgz#82a8b518bff1018ab1d21ced9e35ffbe1681ad03" integrity sha512-DAxroI2uSOgUKLz00NX6A8U/8EE3SZHmIND+10jkVSaypvyt57J5JEOxAQOL6lQxyzi/wZbTIwssU1uy69h5Vg== +crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + cssom@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" @@ -2768,7 +2958,7 @@ define-data-property@^1.0.1, define-data-property@^1.1.4: es-errors "^1.3.0" gopd "^1.0.1" -define-properties@^1.2.0, define-properties@^1.2.1: +define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== @@ -2787,6 +2977,14 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== +des.js@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.1.0.tgz#1d37f5766f3bbff4ee9638e871a8768c173b81da" + integrity sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + destr@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/destr/-/destr-2.0.3.tgz#7f9e97cb3d16dbdca7be52aca1644ce402cfe449" @@ -2812,6 +3010,15 @@ diff-sequences@^29.6.3: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -2826,6 +3033,11 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" +domain-browser@^4.22.0: + version "4.23.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.23.0.tgz#427ebb91efcb070f05cffdfb8a4e9a6c25f8c94b" + integrity sha512-ArzcM/II1wCCujdCNyQjXrAFwS4mrLh4C7DZWlaI8mdh7h3BfKdNd3bKXITfl2PT9FtfQqaGvhi1vPRQPimjGA== + domexception@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" @@ -2848,6 +3060,19 @@ electron-to-chromium@^1.4.796: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.798.tgz#6a3fcab2edc1e66e3883466f6b4b8944323c0164" integrity sha512-by9J2CiM9KPGj9qfp5U4FcPSbXJG7FNzqnYaY4WLzX+v2PHieVGmnsA4dxfpGE3QEC7JofpPZmn7Vn1B9NR2+Q== +elliptic@^6.5.3, elliptic@^6.5.5: + version "6.5.6" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.6.tgz#ee5f7c3a00b98a2144ac84d67d01f04d438fa53e" + integrity sha512-mpzdtpeCLuS3BmE3pO3Cpp5bbjlOPY2Q0PgoF+Od1XZrHLYI28Xe3ossCmYCQt11FQKEYd9+PF8jymTvtWJSHQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + emittery@^0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" @@ -2981,6 +3206,14 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +esbuild-node-externals@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/esbuild-node-externals/-/esbuild-node-externals-1.14.0.tgz#fc2950c67a068dc2b538fd1381ad7d8e20a6f54d" + integrity sha512-jMWnTlCII3cLEjR5+u0JRSTJuP+MgbjEHKfwSIAI41NgLQ0ZjfzjchlbEn0r7v2u5gCBMSEYvYlkO7GDG8gG3A== + dependencies: + find-up "^5.0.0" + tslib "^2.4.1" + esbuild@^0.21.1: version "0.21.5" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d" @@ -3259,11 +3492,19 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -events@^3.3.0: +events@^3.0.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + execa@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -3697,6 +3938,31 @@ has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: dependencies: has-symbols "^1.0.3" +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash-base@~3.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" @@ -3709,6 +3975,15 @@ headers-polyfill@3.2.5: resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-3.2.5.tgz#6e67d392c9d113d37448fe45014e0afdd168faed" integrity sha512-tUCGvt191vNSQgttSyJoibR+VO+I6+iCHIUdhzEMJKE+EAL8BwCN7fUOZlY4ofOelNHsK+gEjxB/B+9N3EWtdA== +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + html-encoding-sniffer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" @@ -3735,6 +4010,11 @@ http-shutdown@^1.2.2: resolved "https://registry.yarnpkg.com/http-shutdown/-/http-shutdown-1.2.2.tgz#41bc78fc767637c4c95179bc492f312c0ae64c5f" integrity sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw== +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg== + https-proxy-agent@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -3816,7 +4096,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@^2.0.4: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3976,6 +4256,14 @@ is-interactive@^1.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== +is-nan@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" + integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + is-negative-zero@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" @@ -4085,6 +4373,11 @@ isarray@^2.0.5: resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -4098,6 +4391,11 @@ isomorphic-fetch@^3.0.0: node-fetch "^2.6.1" whatwg-fetch "^3.4.1" +isomorphic-timers-promises@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/isomorphic-timers-promises/-/isomorphic-timers-promises-1.0.1.tgz#e4137c24dbc54892de8abae3a4b5c1ffff381598" + integrity sha512-u4sej9B1LPSxTGKB/HiuzvEQnXH0ECYkSVQU39koSwmFAxhlEAFl9RdTvLv4TOTQUgBS5O3O5fwUxk6byBZ+IQ== + isomorphic-unfetch@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" @@ -4811,6 +5109,15 @@ makeerror@1.0.12: dependencies: tmpl "1.0.5" +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -4834,6 +5141,14 @@ micromatch@^4.0.4, micromatch@^4.0.5: braces "^3.0.3" picomatch "^2.3.1" +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -4861,6 +5176,16 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -5007,6 +5332,39 @@ node-releases@^2.0.14: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-stdlib-browser@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/node-stdlib-browser/-/node-stdlib-browser-1.2.0.tgz#5ddcfdf4063b88fb282979a1aa6ddab9728d5e4c" + integrity sha512-VSjFxUhRhkyed8AtLwSCkMrJRfQ3e2lGtG3sP6FEgaLKBBbxM/dLfjRe1+iLhjvyLFW3tBQ8+c0pcOtXGbAZJg== + dependencies: + assert "^2.0.0" + browser-resolve "^2.0.0" + browserify-zlib "^0.2.0" + buffer "^5.7.1" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + create-require "^1.1.1" + crypto-browserify "^3.11.0" + domain-browser "^4.22.0" + events "^3.0.0" + https-browserify "^1.0.0" + isomorphic-timers-promises "^1.0.1" + os-browserify "^0.3.0" + path-browserify "^1.0.1" + pkg-dir "^5.0.0" + process "^0.11.10" + punycode "^1.4.1" + querystring-es3 "^0.2.1" + readable-stream "^3.6.0" + stream-browserify "^3.0.0" + stream-http "^3.2.0" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.1" + url "^0.11.0" + util "^0.12.4" + vm-browserify "^1.0.1" + normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -5036,12 +5394,20 @@ object-inspect@^1.13.1: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== +object-is@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.6.tgz#1a6a53aed2dd8f7e6775ff870bea58545956ab07" + integrity sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.5: +object.assign@^4.1.4, object.assign@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== @@ -5146,6 +5512,11 @@ ora@^5.4.1: strip-ansi "^6.0.0" wcwidth "^1.0.1" +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A== + os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -5189,6 +5560,11 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +pako@~1.0.5: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -5196,6 +5572,18 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-asn1@^5.0.0, parse-asn1@^5.1.7: + version "5.1.7" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.7.tgz#73cdaaa822125f9647165625eb45f8a051d2df06" + integrity sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg== + dependencies: + asn1.js "^4.10.1" + browserify-aes "^1.2.0" + evp_bytestokey "^1.0.3" + hash-base "~3.0" + pbkdf2 "^3.1.2" + safe-buffer "^5.2.1" + parse-json@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -5213,6 +5601,11 @@ parse5@^7.0.0, parse5@^7.1.1: dependencies: entities "^4.4.0" +path-browserify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" + integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -5261,6 +5654,17 @@ pathe@^1.1.1, pathe@^1.1.2: resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== +pbkdf2@^3.0.3, pbkdf2@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + picocolors@^1.0.0, picocolors@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" @@ -5313,6 +5717,13 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pkg-dir@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760" + integrity sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA== + dependencies: + find-up "^5.0.0" + pkg-types@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.1.3.tgz#161bb1242b21daf7795036803f28e30222e476e3" @@ -5370,6 +5781,11 @@ pretty-format@^29.0.0, pretty-format@^29.7.0: ansi-styles "^5.0.0" react-is "^18.0.0" +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + process-warning@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-1.0.0.tgz#980a0b25dc38cd6034181be4b7726d89066b4616" @@ -5434,6 +5850,23 @@ psl@^1.1.33: resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== + punycode@^2.1.0, punycode@^2.1.1: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" @@ -5458,6 +5891,13 @@ qs@6.11.2: dependencies: side-channel "^1.0.4" +qs@^6.11.2: + version "6.12.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.3.tgz#e43ce03c8521b9c7fd7f1f13e514e5ca37727754" + integrity sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ== + dependencies: + side-channel "^1.0.6" + query-string@7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328" @@ -5468,6 +5908,11 @@ query-string@7.1.3: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" +querystring-es3@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA== + querystringify@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" @@ -5493,6 +5938,21 @@ radix3@^1.1.2: resolved "https://registry.yarnpkg.com/radix3/-/radix3-1.1.2.tgz#fd27d2af3896c6bf4bcdfab6427c69c2afc69ec0" integrity sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA== +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + react-is@^18.0.0: version "18.3.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" @@ -5505,7 +5965,20 @@ react@^18.3.1: dependencies: loose-envify "^1.1.0" -readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0, readable-stream@^3.6.2: +readable-stream@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0, readable-stream@^3.6.2: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -5589,7 +6062,7 @@ resolve.exports@^2.0.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@^1.10.1, resolve@^1.20.0, resolve@^1.22.4: +resolve@^1.10.1, resolve@^1.17.0, resolve@^1.20.0, resolve@^1.22.4: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -5618,6 +6091,14 @@ rimraf@^5.0.6: dependencies: glob "^10.3.7" +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -5654,11 +6135,16 @@ safe-array-concat@^1.1.2: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + safe-regex-test@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" @@ -5722,6 +6208,19 @@ set-function-name@^2.0.1: functions-have-names "^1.2.3" has-property-descriptors "^1.0.2" +setimmediate@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -5734,7 +6233,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -side-channel@^1.0.4: +side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== @@ -5811,6 +6310,24 @@ std-env@^3.7.0: resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== +stream-browserify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" + integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== + dependencies: + inherits "~2.0.4" + readable-stream "^3.5.0" + +stream-http@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.2.0.tgz#1872dfcf24cb15752677e40e5c3f9cc1926028b5" + integrity sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.4" + readable-stream "^3.6.0" + xtend "^4.0.2" + stream-shift@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" @@ -5887,14 +6404,21 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -string_decoder@^1.1.1, string_decoder@^1.3.0: +string_decoder@^1.0.0, string_decoder@^1.1.1, string_decoder@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: safe-buffer "~5.2.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -5908,6 +6432,13 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -6015,6 +6546,13 @@ through@^2.3.6: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== +timers-browserify@^2.0.4: + version "2.0.12" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" + integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== + dependencies: + setimmediate "^1.0.4" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -6107,11 +6645,16 @@ tslib@1.14.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.1.0, tslib@^2.6.2: +tslib@^2.1.0, tslib@^2.4.1, tslib@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== +tty-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" + integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -6289,17 +6832,25 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" +url@^0.11.0: + version "0.11.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.3.tgz#6f495f4b935de40ce4a0a52faee8954244f3d3ad" + integrity sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw== + dependencies: + punycode "^1.4.1" + qs "^6.11.2" + use-sync-external-store@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== -util-deprecate@^1.0.1: +util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -util@^0.12.3: +util@^0.12.3, util@^0.12.4, util@^0.12.5: version "0.12.5" resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== @@ -6324,6 +6875,11 @@ v8-to-istanbul@^9.0.1: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^2.0.0" +vm-browserify@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" + integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== + w3c-xmlserializer@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073" @@ -6441,8 +6997,7 @@ word-wrap@^1.2.5: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: - name wrap-ansi-cjs +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -6460,6 +7015,15 @@ wrap-ansi@^6.0.1: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -6502,6 +7066,11 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== +xtend@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" From 776df84ef6d9f0a53382109156c60ade67b8a1ba Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Fri, 19 Jul 2024 18:31:45 +0300 Subject: [PATCH 07/17] 0.0.0-alpha.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aca857d..939238c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-dapp-core", - "version": "0.0.0-alpha.2", + "version": "0.0.0-alpha.7", "main": "out/index.js", "module": "out/index.js", "types": "out/index.d.ts", From 6b8828cf461a8d4931eaa5c642a8d9df86240e97 Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Fri, 19 Jul 2024 18:34:26 +0300 Subject: [PATCH 08/17] changelog update --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a60d0a4..6073711 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [[v0.0.0-alpha.8]](https://github.com/multiversx/mx-sdk-dapp-core/pull/16)] - 2024-08-27 -- [Added `@multiversx/sdk-web-wallet-cross-window-provider` as peer dep](https://github.com/multiversx/mx-sdk-dapp-core/pull/15) +- [Fix Node Polyfills](https://github.com/multiversx/mx-sdk-dapp-core/pull/10) - [Removed chain id from network slice & added esbuild and absolute imports](https://github.com/multiversx/mx-sdk-dapp-core/pull/3) - [Reverted absolute imports](https://github.com/multiversx/mx-sdk-dapp-core/pull/2) - [Added network store](https://github.com/multiversx/mx-sdk-dapp-core/pull/1) From 0a901532a365a7af10d6898a4b6bf710636b1ac4 Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Fri, 19 Jul 2024 18:39:05 +0300 Subject: [PATCH 09/17] yarn lock --- yarn.lock | 564 +++++++++++++++++++++++++++--------------------------- 1 file changed, 286 insertions(+), 278 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5276fa4..bc1fb27 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,50 +18,50 @@ "@babel/highlight" "^7.24.7" picocolors "^1.0.0" -"@babel/compat-data@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed" - integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== +"@babel/compat-data@^7.24.8": + version "7.24.9" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.9.tgz#53eee4e68f1c1d0282aa0eb05ddb02d033fc43a0" + integrity sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4" - integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== + version "7.24.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.9.tgz#dc07c9d307162c97fa9484ea997ade65841c7c82" + integrity sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-module-transforms" "^7.24.7" - "@babel/helpers" "^7.24.7" - "@babel/parser" "^7.24.7" + "@babel/generator" "^7.24.9" + "@babel/helper-compilation-targets" "^7.24.8" + "@babel/helper-module-transforms" "^7.24.9" + "@babel/helpers" "^7.24.8" + "@babel/parser" "^7.24.8" "@babel/template" "^7.24.7" - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/traverse" "^7.24.8" + "@babel/types" "^7.24.9" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.24.7", "@babel/generator@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" - integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== +"@babel/generator@^7.24.8", "@babel/generator@^7.24.9", "@babel/generator@^7.7.2": + version "7.24.10" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.10.tgz#a4ab681ec2a78bbb9ba22a3941195e28a81d8e76" + integrity sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg== dependencies: - "@babel/types" "^7.24.7" + "@babel/types" "^7.24.9" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9" - integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== +"@babel/helper-compilation-targets@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz#b607c3161cd9d1744977d4f97139572fe778c271" + integrity sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw== dependencies: - "@babel/compat-data" "^7.24.7" - "@babel/helper-validator-option" "^7.24.7" - browserslist "^4.22.2" + "@babel/compat-data" "^7.24.8" + "@babel/helper-validator-option" "^7.24.8" + browserslist "^4.23.1" lru-cache "^5.1.1" semver "^6.3.1" @@ -95,10 +95,10 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/helper-module-transforms@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8" - integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== +"@babel/helper-module-transforms@^7.24.9": + version "7.24.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.9.tgz#e13d26306b89eea569180868e652e7f514de9d29" + integrity sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw== dependencies: "@babel/helper-environment-visitor" "^7.24.7" "@babel/helper-module-imports" "^7.24.7" @@ -107,9 +107,9 @@ "@babel/helper-validator-identifier" "^7.24.7" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.8.0": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz#98c84fe6fe3d0d3ae7bfc3a5e166a46844feb2a0" - integrity sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg== + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz#94ee67e8ec0e5d44ea7baeb51e571bd26af07878" + integrity sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg== "@babel/helper-simple-access@^7.24.7": version "7.24.7" @@ -126,28 +126,28 @@ dependencies: "@babel/types" "^7.24.7" -"@babel/helper-string-parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" - integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== "@babel/helper-validator-identifier@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== -"@babel/helper-validator-option@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6" - integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== +"@babel/helper-validator-option@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" + integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== -"@babel/helpers@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416" - integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== +"@babel/helpers@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.8.tgz#2820d64d5d6686cca8789dd15b074cd862795873" + integrity sha512-gV2265Nkcz7weJJfvDoAEVzC1e2OTDpkGbEsebse8koXUJUXPsCMi7sRo/+SPMuMZ9MtUPnGwITTnQnU5YjyaQ== dependencies: "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/types" "^7.24.8" "@babel/highlight@^7.24.7": version "7.24.7" @@ -159,10 +159,10 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" - integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.7", "@babel/parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.8.tgz#58a4dbbcad7eb1d48930524a3fd93d93e9084c6f" + integrity sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -271,28 +271,28 @@ "@babel/parser" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/traverse@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" - integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== +"@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.8.tgz#6c14ed5232b7549df3371d820fbd9abfcd7dfab7" + integrity sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ== dependencies: "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" + "@babel/generator" "^7.24.8" "@babel/helper-environment-visitor" "^7.24.7" "@babel/helper-function-name" "^7.24.7" "@babel/helper-hoist-variables" "^7.24.7" "@babel/helper-split-export-declaration" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/parser" "^7.24.8" + "@babel/types" "^7.24.8" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.3.3": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" - integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.24.9", "@babel/types@^7.3.3": + version "7.24.9" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.9.tgz#228ce953d7b0d16646e755acf204f4cf3d08cc73" + integrity sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ== dependencies: - "@babel/helper-string-parser" "^7.24.7" + "@babel/helper-string-parser" "^7.24.8" "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" @@ -424,9 +424,9 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": - version "4.10.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0" - integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== + version "4.11.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" + integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== "@eslint/eslintrc@^3.0.2": version "3.1.0" @@ -751,9 +751,9 @@ integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" @@ -773,12 +773,12 @@ rxjs "6" semver "^7.3.5" -"@ledgerhq/devices@^8.0.3", "@ledgerhq/devices@^8.0.5", "@ledgerhq/devices@^8.4.0": - version "8.4.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.4.0.tgz#f3a03576d4a53d731bdaa212a00bd0adbfb86fb1" - integrity sha512-TUrMlWZJ+5AFp2lWMw4rGQoU+WtjIqlFX5SzQDL9phaUHrt4TFierAGHsaj5+tUHudhD4JhIaLI2cn1NOyq5NQ== +"@ledgerhq/devices@^8.0.3", "@ledgerhq/devices@^8.0.5", "@ledgerhq/devices@^8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.4.1.tgz#ab47c188ef9156f6b81c37c4ef2f2aeec97c19bf" + integrity sha512-Mbjzqlcj4Q2StxEmaYEb5wv6sK5Sk26L4xs0BC9io/AyvpXNTDAp67tryB/klNcvd+WwZPcPdYYvlNzfQ0WTUA== dependencies: - "@ledgerhq/errors" "^6.17.0" + "@ledgerhq/errors" "^6.18.0" "@ledgerhq/logs" "^6.12.0" rxjs "^7.8.1" semver "^7.3.5" @@ -788,10 +788,10 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.12.6.tgz#f89c82c91c2930f34bc3e0d86a27ec7b6e6e4f5f" integrity sha512-D+r2B09vaRO06wfGoss+rNgwqWSoK0bCtsaJWzlD2hv1zxTtucqVtSztbRFypIqxWTCb3ix5Nh2dWHEJVTp2Xw== -"@ledgerhq/errors@^6.12.6", "@ledgerhq/errors@^6.13.0", "@ledgerhq/errors@^6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.17.0.tgz#0d56361fe6eb7de3b239e661710679f933f1fcca" - integrity sha512-xnOVpy/gUUkusEORdr2Qhw3Vd0MGfjyVGgkGR9Ck6FXE26OIdIQ3tNmG5BdZN+gwMMFJJVxxS4/hr0taQfZ43w== +"@ledgerhq/errors@^6.12.6", "@ledgerhq/errors@^6.13.0", "@ledgerhq/errors@^6.18.0": + version "6.18.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.18.0.tgz#d55d6a57430d7a86532a9033ce0b45103264c620" + integrity sha512-L3jQWAGyooxRDk/MRlW2v4Ji9+kloBtdmz9wBkHaj2j0n+05rweJSV3GHw9oye1BYMbVFqFffmT4H3hlXlCasw== "@ledgerhq/hw-transport-web-ble@6.27.17": version "6.27.17" @@ -834,12 +834,12 @@ events "^3.3.0" "@ledgerhq/hw-transport@^6.28.4", "@ledgerhq/hw-transport@^6.28.6": - version "6.31.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.31.0.tgz#82d8154bbcec8dc0104009a646159190fba5ae76" - integrity sha512-BY1poLk8vlJdIYngp8Zfaa/V9n14dqgt1G7iNetVRhJVFEKp9EYONeC3x6q/N7x81LUpzBk6M+T+s46Z4UiXHw== + version "6.31.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.31.1.tgz#fb462c5455fc6c1e8300c216cc52df6f3fb88565" + integrity sha512-0hVcrqUOM7AYV/JEq8yoeBiXLjpWrentgYt8MC3n+iNFfpORU/SUprcbu0s884IHzj+a8mx0JCZp9y7uPSLlzg== dependencies: - "@ledgerhq/devices" "^8.4.0" - "@ledgerhq/errors" "^6.17.0" + "@ledgerhq/devices" "^8.4.1" + "@ledgerhq/errors" "^6.18.0" "@ledgerhq/logs" "^6.12.0" events "^3.3.0" @@ -934,9 +934,9 @@ uuid "^9.0.1" "@metamask/utils@^9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-9.0.0.tgz#cbcdf90e2cfc425f67731fc50d44bdf501daae36" - integrity sha512-Q/PzQCm6rkmePxHghXgJuYEkVfSvwKLLFZwFtfmLAz4mxIPuFJSMawaJM7sfZsVybK5Bf9QaKAjgMvHk5iGGvA== + version "9.1.0" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-9.1.0.tgz#54e5afcec07e6032d4dd4171e862b36daa52d77e" + integrity sha512-g2REf+xSt0OZfMoNNdC4+/Yy8eP3KUqvIArel54XRFKPoXbHI6+YjFfrLtfykWBjffOp7DTfIc3Kvk5TLfuiyg== dependencies: "@ethereumjs/tx" "^4.2.0" "@metamask/superstruct" "^3.1.0" @@ -985,9 +985,9 @@ protobufjs "7.2.4" "@multiversx/sdk-core@>= 13.0.0": - version "13.2.1" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-13.2.1.tgz#ed7cb7048b76d611adb2601ecb58eddb74977228" - integrity sha512-qnC4Q2x+lc7jw5GYja5yvRhqKaJ+2m95txNS6FwLXPb/MxW0ZwRZsAt4qByxOF5hpx6m9v3bJnKFFZn9VrHcNw== + version "13.2.2" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-13.2.2.tgz#e98f8ede0c1898e1571ad9a63a92385d8ceb276f" + integrity sha512-ABQuy7PcFBnl5f9yFczgaq7tX72X0M836Ky9h4HRCQd5Mao3OJ3TrgHEvxZe9SVYXtwOm337iPsbkZzVslxu9A== dependencies: "@multiversx/sdk-transaction-decoder" "1.0.2" bech32 "1.1.4" @@ -1440,74 +1440,74 @@ "@stablelib/random" "^1.0.2" "@stablelib/wipe" "^1.0.1" -"@swc/core-darwin-arm64@1.5.28": - version "1.5.28" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.5.28.tgz#b0b5a163c6bb34468f1a2307c040811e73a1b253" - integrity sha512-sP6g63ybzIdOWNDbn51tyHN8EMt7Mb4RMeHQEsXB7wQfDvzhpWB+AbfK6Gs3Q8fwP/pmWIrWW9csKOc1K2Mmkg== - -"@swc/core-darwin-x64@1.5.28": - version "1.5.28" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.5.28.tgz#66829b4c1ab7a0dcb708c5af381b2c5b20c41291" - integrity sha512-Bd/agp/g7QocQG5AuorOzSC78t8OzeN+pCN/QvJj1CvPhvppjJw6e1vAbOR8vO2vvGi2pvtf3polrYQStJtSiA== - -"@swc/core-linux-arm-gnueabihf@1.5.28": - version "1.5.28" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.5.28.tgz#9f85d568d81928301d633ae2ff19c916d07a2d15" - integrity sha512-Wr3TwPGIveS9/OBWm0r9VAL8wkCR0zQn46J8K01uYCmVhUNK3Muxjs0vQBZaOrGu94mqbj9OXY+gB3W7aDvGdA== - -"@swc/core-linux-arm64-gnu@1.5.28": - version "1.5.28" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.5.28.tgz#5489cc4f7a1846e783bc85ba017306b235f97764" - integrity sha512-8G1ZwVTuLgTAVTMPD+M97eU6WeiRIlGHwKZ5fiJHPBcz1xqIC7jQcEh7XBkobkYoU5OILotls3gzjRt8CMNyDQ== - -"@swc/core-linux-arm64-musl@1.5.28": - version "1.5.28" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.5.28.tgz#30894beef4b86fee461d986be2633fa978c03083" - integrity sha512-0Ajdzb5Fzvz+XUbN5ESeHAz9aHHSYiQcm+vmsDi0TtPHmsalfnqEPZmnK0zPALPJPLQP2dDo4hELeDg3/c3xgA== - -"@swc/core-linux-x64-gnu@1.5.28": - version "1.5.28" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.5.28.tgz#e57aff87b9e28c9f239cdfa071dfb2f1123eefa7" - integrity sha512-ueQ9VejnQUM2Pt+vT0IAKoF4vYBWUP6n1KHGdILpoGe3LuafQrqu7RoyQ15C7/AYii7hAeNhTFdf6gLbg8cjFg== - -"@swc/core-linux-x64-musl@1.5.28": - version "1.5.28" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.5.28.tgz#d766c396063568a18db250c7783cef7141f86d44" - integrity sha512-G5th8Mg0az8CbY4GQt9/m5hg2Y0kGIwvQBeVACuLQB6q2Y4txzdiTpjmFqUUhEvvl7Klyx1IHvNhfXs3zpt7PA== - -"@swc/core-win32-arm64-msvc@1.5.28": - version "1.5.28" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.5.28.tgz#aebb03f89e00d0381d7586d34374d909525975f1" - integrity sha512-JezwCGavZ7CkNXx4yInI4kpb71L0zxzxA9BFlmnsGKEEjVQcKc3hFpmIzfFVs+eotlBUwDNb0+Yo9m6Cb7lllA== - -"@swc/core-win32-ia32-msvc@1.5.28": - version "1.5.28" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.5.28.tgz#37d2698c51001d129fa7380728673911c90b58bc" - integrity sha512-q8tW5J4RkOkl7vYShnWS//VAb2Ngolfm9WOMaF2GRJUr2Y/Xeb/+cNjdsNOqea2BzW049D5vdP7XPmir3/zUZw== - -"@swc/core-win32-x64-msvc@1.5.28": - version "1.5.28" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.5.28.tgz#57c9f955215e0103fe8a60994bdf256a3b6dc31d" - integrity sha512-jap6EiB3wG1YE1hyhNr9KLPpH4PGm+5tVMfN0l7fgKtV0ikgpcEN/YF94tru+z5m2HovqYW009+Evq9dcVGmpg== +"@swc/core-darwin-arm64@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.0.tgz#fdc694dd6e8543f3efea0619a6fba9ce82939205" + integrity sha512-2ylhM7f0HwUwLrFYZAe/dse8PCbPsYcJS3Dt7Q8NT3PUn7vy6QOMxNcOPPuDrnmaXqQQO3oxdmRapguTxaat9g== + +"@swc/core-darwin-x64@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.0.tgz#a9a78ace5c7e43c8cb68d11c53d33a0bf966ca8e" + integrity sha512-SgVnN4gT1Rb9YfTkp4FCUITqSs7Yj0uB2SUciu5CV3HuGvS5YXCUzh+KrwpLFtx8NIgivISKcNnb41mJi98X8Q== + +"@swc/core-linux-arm-gnueabihf@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.0.tgz#6861ac82fda01b68b44970d3b9aaa955d7311d98" + integrity sha512-+Z9Dayart1iKJQEJJ9N/KS4z5EdXJE3WPFikY0jonKTo4Dd8RuyVz5yLvqcIMeVdz/SwximATaL6iJXw7hZS9A== + +"@swc/core-linux-arm64-gnu@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.0.tgz#aa0e3dac17807c73d501f52526115666d60ea7a6" + integrity sha512-UnLrCiZ1EI4shznJn0xP6DLgsXUSwtfsdgHhGYCrvbgVBBve3S9iFgVFEB3SPl7Q/TdowNbrN4zHU0oChfiNfw== + +"@swc/core-linux-arm64-musl@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.0.tgz#4bb226a4e9eabac4e1a3b3ffd7ea5955629c84ed" + integrity sha512-H724UANA+ptsfwKRr9mnaDa9cb5fw0oFysiGKTgb3DMYcgk3Od0jMTnXVPFSVpo7FlmyxeC9K8ueUPBOoOK6XA== + +"@swc/core-linux-x64-gnu@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.0.tgz#ee65d1362214e91de89414f41b3310ba5302c2c5" + integrity sha512-SY3HA0K0Dpqt1HIfMLGpwL4hd4UaL2xHP5oZXPlRQPhUDZrbb4PbI3ZJnh66c63eL4ZR8EJ+HRFI0Alx5p69Zw== + +"@swc/core-linux-x64-musl@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.0.tgz#0868518771004753acb07d9871cf5b143b51dc30" + integrity sha512-cEJ2ebtV1v/5Ilb55E05J6F5SrHKQWzUttIhR5Mkayyo+yvPslcpByuFC3D+J7X1ebziTOBpWuMpUdjLfh3SMQ== + +"@swc/core-win32-arm64-msvc@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.0.tgz#43048d67f871e798566c3883c991bed521ef3b9e" + integrity sha512-ecQOOmzEssz+m0pR4xDYCGuvn3E/l0nQ3tk5jp1NA1lsAy4bMV0YbYCHjptYvWL/UjhIerIp3IlCJ8x5DodSog== + +"@swc/core-win32-ia32-msvc@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.0.tgz#6e98f413e6469cfd00dcc7c106cb69f2c709e581" + integrity sha512-gz81seZkRn3zMnVOc7L5k6F4vQC82gIxmHiL+GedK+A37XI/X26AASU3zxvORnqQbwQYXQ+AEVckxBmFlz3v2g== + +"@swc/core-win32-x64-msvc@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.0.tgz#79dfce878552f0a066a40c9cef524f4a8f872674" + integrity sha512-b5Fd1xEOw9uqBpj2lqsaR4Iq9UhiL84hNDcEsi6DQA7Y1l85waQAslTbS0E4/pJ1PISAs0jW0zIGLco1eaWBOg== "@swc/core@^1.4.17": - version "1.5.28" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.5.28.tgz#cba572d6a205cc3efa20b38935cad631d6ba2deb" - integrity sha512-muCdNIqOTURUgYeyyOLYE3ShL8SZO6dw6bhRm6dCvxWzCZOncPc5fB0kjcPXTML+9KJoHL7ks5xg+vsQK+v6ig== + version "1.7.0" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.7.0.tgz#81f4e7dadf03e1d7f9a5e48a87f5d857e8fc1468" + integrity sha512-d4vMzH6ICllDwlPuhset2h8gu/USHdbyfJim+2hQEdxC0UONtfpmu38XBgNqRjStrji1Q5M10jfeUZL3cu1i8g== dependencies: "@swc/counter" "^0.1.3" - "@swc/types" "^0.1.8" + "@swc/types" "^0.1.9" optionalDependencies: - "@swc/core-darwin-arm64" "1.5.28" - "@swc/core-darwin-x64" "1.5.28" - "@swc/core-linux-arm-gnueabihf" "1.5.28" - "@swc/core-linux-arm64-gnu" "1.5.28" - "@swc/core-linux-arm64-musl" "1.5.28" - "@swc/core-linux-x64-gnu" "1.5.28" - "@swc/core-linux-x64-musl" "1.5.28" - "@swc/core-win32-arm64-msvc" "1.5.28" - "@swc/core-win32-ia32-msvc" "1.5.28" - "@swc/core-win32-x64-msvc" "1.5.28" + "@swc/core-darwin-arm64" "1.7.0" + "@swc/core-darwin-x64" "1.7.0" + "@swc/core-linux-arm-gnueabihf" "1.7.0" + "@swc/core-linux-arm64-gnu" "1.7.0" + "@swc/core-linux-arm64-musl" "1.7.0" + "@swc/core-linux-x64-gnu" "1.7.0" + "@swc/core-linux-x64-musl" "1.7.0" + "@swc/core-win32-arm64-msvc" "1.7.0" + "@swc/core-win32-ia32-msvc" "1.7.0" + "@swc/core-win32-x64-msvc" "1.7.0" "@swc/counter@^0.1.3": version "0.1.3" @@ -1523,10 +1523,10 @@ "@swc/counter" "^0.1.3" jsonc-parser "^3.2.0" -"@swc/types@^0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.8.tgz#2c81d107c86cfbd0c3a05ecf7bb54c50dfa58a95" - integrity sha512-RNFA3+7OJFNYY78x0FYwi1Ow+iF1eF5WvmfY1nXPOEH4R2p/D4Cr1vzje7dNAI2aLFqpv8Wyz4oKSWqIZArpQA== +"@swc/types@^0.1.9": + version "0.1.9" + resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.9.tgz#e67cdcc2e4dd74a3cef4474b465eb398e7ae83e2" + integrity sha512-qKnCno++jzcJ4lM4NTfYifm1EFSCeIfKiAHAfkENZAV5Kl9PjJIyd2yeeVv6c/2CckuLyv2NmRC5pv6pm2WQBg== dependencies: "@swc/counter" "^0.1.3" @@ -1639,9 +1639,9 @@ integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/lodash@^4.17.4": - version "4.17.5" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.5.tgz#e6c29b58e66995d57cd170ce3e2a61926d55ee04" - integrity sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw== + version "4.17.7" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" + integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== "@types/ms@*": version "0.7.34" @@ -1657,9 +1657,9 @@ form-data "^4.0.0" "@types/node@*", "@types/node@>=13.7.0": - version "20.14.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.2.tgz#a5f4d2bcb4b6a87bffcaa717718c5a0f208f4a18" - integrity sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q== + version "20.14.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.11.tgz#09b300423343460455043ddd4d0ded6ac579b74b" + integrity sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA== dependencies: undici-types "~5.26.4" @@ -1681,9 +1681,9 @@ integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== "@types/set-cookie-parser@^2.4.0": - version "2.4.7" - resolved "https://registry.yarnpkg.com/@types/set-cookie-parser/-/set-cookie-parser-2.4.7.tgz#4a341ed1d3a922573ee54db70b6f0a6d818290e7" - integrity sha512-+ge/loa0oTozxip6zmhRIk8Z/boU51wl9Q6QdLZcokIGMzY5lFXYy/x7Htj2HTC6/KZP1hUbZ1ekx8DYXICvWg== + version "2.4.10" + resolved "https://registry.yarnpkg.com/@types/set-cookie-parser/-/set-cookie-parser-2.4.10.tgz#ad3a807d6d921db9720621ea3374c5d92020bcbc" + integrity sha512-GGmQVGpQWUe5qglJozEjZV/5dyxbOOZ0LHe/lqyWssB88Y4svNfst0uqBVscdDeIKl5Jy5+aPSvy7mI9tYRguw== dependencies: "@types/node" "*" @@ -2034,14 +2034,16 @@ acorn-jsx@^5.3.2: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.0.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" - integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== + version "8.3.3" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" + integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== + dependencies: + acorn "^8.11.0" -acorn@^8.1.0, acorn@^8.11.3, acorn@^8.8.1: - version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== +acorn@^8.1.0, acorn@^8.11.0, acorn@^8.11.3, acorn@^8.12.0, acorn@^8.8.1: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== agent-base@6: version "6.0.2" @@ -2481,15 +2483,15 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.22.2: - version "4.23.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" - integrity sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw== +browserslist@^4.23.1: + version "4.23.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.2.tgz#244fe803641f1c19c28c48c4b6ec9736eb3d32ed" + integrity sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA== dependencies: - caniuse-lite "^1.0.30001629" - electron-to-chromium "^1.4.796" + caniuse-lite "^1.0.30001640" + electron-to-chromium "^1.4.820" node-releases "^2.0.14" - update-browserslist-db "^1.0.16" + update-browserslist-db "^1.1.0" bs-logger@0.x: version "0.2.6" @@ -2562,10 +2564,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001629: - version "1.0.30001632" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz#964207b7cba5851701afb4c8afaf1448db3884b6" - integrity sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg== +caniuse-lite@^1.0.30001640: + version "1.0.30001642" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz#6aa6610eb24067c246d30c57f055a9d0a7f8d05f" + integrity sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA== chalk@^2.4.2: version "2.4.2" @@ -2751,9 +2753,9 @@ convert-source-map@^2.0.0: integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== cookie-es@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/cookie-es/-/cookie-es-1.1.0.tgz#68f8d9f48aeb5a534f3896f80e792760d3d20def" - integrity sha512-L2rLOcK0wzWSfSDA33YR+PUHDG10a8px7rUHKWbGLP4YfbsMed2KFUw5fczvDPbT98DDe3LEzviswl810apTEw== + version "1.2.1" + resolved "https://registry.yarnpkg.com/cookie-es/-/cookie-es-1.2.1.tgz#7e417c2a708ec0f5e0b0cc026b8f04ff0e532917" + integrity sha512-ilTPDuxhZX44BSzzRB58gvSY2UevZKQM9fjisn7Z+NJ92CtSU6kO1+22ZN/agbEJANFjK85EiJJbi/gQv18OXA== cookie@^0.4.2: version "0.4.2" @@ -2967,7 +2969,7 @@ define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: has-property-descriptors "^1.0.0" object-keys "^1.1.1" -defu@^6.1.3, defu@^6.1.4: +defu@^6.1.4: version "6.1.4" resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.4.tgz#4e0c9cf9ff68fe5f3d7f2765cc1a012dfdcb0479" integrity sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg== @@ -3055,10 +3057,10 @@ duplexify@^4.1.2: readable-stream "^3.1.1" stream-shift "^1.0.2" -electron-to-chromium@^1.4.796: - version "1.4.798" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.798.tgz#6a3fcab2edc1e66e3883466f6b4b8944323c0164" - integrity sha512-by9J2CiM9KPGj9qfp5U4FcPSbXJG7FNzqnYaY4WLzX+v2PHieVGmnsA4dxfpGE3QEC7JofpPZmn7Vn1B9NR2+Q== +electron-to-chromium@^1.4.820: + version "1.4.830" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.830.tgz#a11899bc3343bc28f57a87fcf83060e0d28038d4" + integrity sha512-TrPKKH20HeN0J1LHzsYLs2qwXrp8TF4nHdu4sq61ozGbzMpWhI7iIOPYPPkxeq1azMT9PZ8enPFcftbs/Npcjg== elliptic@^6.5.3, elliptic@^6.5.5: version "6.5.6" @@ -3370,9 +3372,9 @@ eslint-plugin-promise@6.1.1: integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig== eslint-scope@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.1.tgz#a9601e4b81a0b9171657c343fb13111688963cfc" - integrity sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og== + version "8.0.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.2.tgz#5cbb33d4384c9136083a71190d548158fe128f94" + integrity sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -3440,11 +3442,11 @@ eslint@9.1.1: text-table "^0.2.0" espree@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-10.0.1.tgz#600e60404157412751ba4a6f3a2ee1a42433139f" - integrity sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww== + version "10.1.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.1.0.tgz#8788dae611574c0f070691f522e4116c5a11fc56" + integrity sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA== dependencies: - acorn "^8.11.3" + acorn "^8.12.0" acorn-jsx "^5.3.2" eslint-visitor-keys "^4.0.0" @@ -3454,9 +3456,9 @@ esprima@^4.0.0, esprima@^4.0.1: integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" @@ -3691,9 +3693,9 @@ for-each@^0.3.3: is-callable "^1.1.3" foreground-child@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" - integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + version "3.2.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.2.1.tgz#767004ccf3a5b30df39bed90718bab43fe0a59f7" + integrity sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA== dependencies: cross-spawn "^7.0.0" signal-exit "^4.0.1" @@ -3788,9 +3790,9 @@ get-symbol-description@^1.0.2: get-intrinsic "^1.2.4" get-tsconfig@^4.5.0: - version "4.7.5" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.5.tgz#5e012498579e9a6947511ed0cd403272c7acbbaf" - integrity sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw== + version "4.7.6" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.6.tgz#118fd5b7b9bae234cc7705a00cd771d7eb65d62a" + integrity sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA== dependencies: resolve-pkg-maps "^1.0.0" @@ -3809,14 +3811,15 @@ glob-parent@^6.0.2: is-glob "^4.0.3" glob@^10.3.14, glob@^10.3.7: - version "10.4.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.1.tgz#0cfb01ab6a6b438177bfe6a58e2576f6efe909c2" - integrity sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw== + version "10.4.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== dependencies: foreground-child "^3.1.0" jackspeak "^3.1.2" minimatch "^9.0.4" minipass "^7.1.2" + package-json-from-dist "^1.0.0" path-scurry "^1.11.1" glob@^7.1.3, glob@^7.1.4: @@ -3879,9 +3882,9 @@ graphemer@^1.4.0: integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== "graphql@^15.0.0 || ^16.0.0": - version "16.8.1" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" - integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== + version "16.9.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.9.0.tgz#1c310e63f16a49ce1fbb230bd0a000e99f6f115f" + integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== h3@^1.10.2, h3@^1.11.1: version "1.12.0" @@ -4190,11 +4193,11 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.13.1: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.0.tgz#71c72ec5442ace7e76b306e9d48db361f22699ea" + integrity sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA== dependencies: - hasown "^2.0.0" + hasown "^2.0.2" is-data-view@^1.0.1: version "1.0.1" @@ -4421,9 +4424,9 @@ istanbul-lib-instrument@^5.0.4: semver "^6.3.0" istanbul-lib-instrument@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz#91655936cf7380e4e473383081e38478b69993b1" - integrity sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw== + version "6.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== dependencies: "@babel/core" "^7.23.9" "@babel/parser" "^7.23.9" @@ -4458,9 +4461,9 @@ istanbul-reports@^3.1.3: istanbul-lib-report "^3.0.0" jackspeak@^3.1.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.0.tgz#a75763ff36ad778ede6a156d8ee8b124de445b4a" - integrity sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw== + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== dependencies: "@isaacs/cliui" "^8.0.2" optionalDependencies: @@ -4952,9 +4955,9 @@ json5@^2.2.3: integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== jsonc-parser@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" - integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== + version "3.3.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" + integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== keccak@3.0.2: version "3.0.2" @@ -5079,9 +5082,9 @@ loose-envify@^1.1.0: js-tokens "^3.0.0 || ^4.0.0" lru-cache@^10.2.0: - version "10.2.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" - integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== + version "10.4.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" + integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== lru-cache@^5.1.1: version "5.1.1" @@ -5194,9 +5197,9 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: brace-expansion "^1.1.7" minimatch@^9.0.4: - version "9.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" - integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== dependencies: brace-expansion "^2.0.1" @@ -5300,7 +5303,7 @@ node-addon-api@^7.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.1.tgz#1aba6693b0f255258a049d621329329322aad558" integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ== -node-fetch-native@^1.6.1, node-fetch-native@^1.6.2, node-fetch-native@^1.6.3: +node-fetch-native@^1.6.2, node-fetch-native@^1.6.3, node-fetch-native@^1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz#679fc8fd8111266d47d7e72c379f1bed9acff06e" integrity sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ== @@ -5328,9 +5331,9 @@ node-int64@^0.4.0: integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + version "2.0.17" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.17.tgz#d74bc4fec38d839eec5db2a3c9c963d4f33cb366" + integrity sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA== node-stdlib-browser@^1.2.0: version "1.2.0" @@ -5385,14 +5388,14 @@ npm-run-path@^5.1.0: path-key "^4.0.0" nwsapi@^2.2.2: - version "2.2.10" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.10.tgz#0b77a68e21a0b483db70b11fad055906e867cda8" - integrity sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ== + version "2.2.12" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.12.tgz#fb6af5c0ec35b27b4581eb3bbad34ec9e5c696f8" + integrity sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w== object-inspect@^1.13.1: - version "1.13.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" - integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== object-is@^1.1.5: version "1.1.6" @@ -5523,9 +5526,9 @@ os-tmpdir@~1.0.2: integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== outvariant@^1.2.1, outvariant@^1.4.0: - version "1.4.2" - resolved "https://registry.yarnpkg.com/outvariant/-/outvariant-1.4.2.tgz#f54f19240eeb7f15b28263d5147405752d8e2066" - integrity sha512-Ou3dJ6bA/UJ5GVHxah4LnqDwZRwAmWxrG3wtrHrbGnP4RnLCtA64A4F+ae7Y8ww660JaddSoArUR5HjipWSHAQ== + version "1.4.3" + resolved "https://registry.yarnpkg.com/outvariant/-/outvariant-1.4.3.tgz#221c1bfc093e8fec7075497e7799fdbf43d14873" + integrity sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA== p-limit@^2.2.0: version "2.3.0" @@ -5560,6 +5563,11 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +package-json-from-dist@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" + integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== + pako@~1.0.5: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" @@ -5823,9 +5831,9 @@ protobufjs@7.2.4: long "^5.0.0" protobufjs@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.3.0.tgz#a32ec0422c039798c41a0700306a6e305b9cb32c" - integrity sha512-YWD03n3shzV9ImZRX3ccbjqLxj7NokGN0V/ESiBV5xWqrommYHYiihuIyavq03pWSGqlyvYUFmfoMKd+1rPA/g== + version "7.3.2" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.3.2.tgz#60f3b7624968868f6f739430cfbc8c9370e26df4" + integrity sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -6085,9 +6093,9 @@ reusify@^1.0.4: integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rimraf@^5.0.6: - version "5.0.7" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.7.tgz#27bddf202e7d89cb2e0381656380d1734a854a74" - integrity sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg== + version "5.0.9" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.9.tgz#c3baa1b886eadc2ec7981a06a593c3d01134ffe9" + integrity sha512-3i7b8OcswU6CpU8Ej89quJD4O98id7TtVM5U4Mybh84zQXdrFmDLouWBEEaD/QfO3gDDfH+AGFCGsR7kngzQnA== dependencies: glob "^10.3.7" @@ -6177,9 +6185,9 @@ semver@^6.1.0, semver@^6.3.0, semver@^6.3.1: integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.5, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: - version "7.6.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" - integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== set-cookie-parser@^2.4.6: version "2.6.0" @@ -6722,14 +6730,14 @@ typed-array-length@^1.0.6: possible-typed-array-names "^1.0.0" typescript@^5.4.5: - version "5.4.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" - integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== + version "5.5.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.3.tgz#e1b0a3c394190838a0b168e771b0ad56a0af0faa" + integrity sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ== ufo@^1.4.0, ufo@^1.5.3: - version "1.5.3" - resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" - integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== + version "1.5.4" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.4.tgz#16d6949674ca0c9e0fbbae1fa20a71d7b1ded754" + integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ== uint8arrays@^3.0.0, uint8arrays@^3.1.0: version "3.1.1" @@ -6759,15 +6767,15 @@ undici-types@~5.26.4: integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== unenv@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/unenv/-/unenv-1.9.0.tgz#469502ae85be1bd3a6aa60f810972b1a904ca312" - integrity sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g== + version "1.10.0" + resolved "https://registry.yarnpkg.com/unenv/-/unenv-1.10.0.tgz#c3394a6c6e4cfe68d699f87af456fe3f0db39571" + integrity sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ== dependencies: consola "^3.2.3" - defu "^6.1.3" + defu "^6.1.4" mime "^3.0.0" - node-fetch-native "^1.6.1" - pathe "^1.1.1" + node-fetch-native "^1.6.4" + pathe "^1.1.2" unfetch@^4.2.0: version "4.2.0" @@ -6804,10 +6812,10 @@ untun@^0.1.3: consola "^3.2.3" pathe "^1.1.1" -update-browserslist-db@^1.0.16: - version "1.0.16" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" - integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== +update-browserslist-db@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== dependencies: escalade "^3.1.2" picocolors "^1.0.1" @@ -6867,9 +6875,9 @@ uuid@^9.0.1: integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== v8-to-istanbul@^9.0.1: - version "9.2.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" - integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== + version "9.3.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" + integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== dependencies: "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" @@ -7052,9 +7060,9 @@ ws@^7.5.1: integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== ws@^8.11.0: - version "8.17.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" - integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== xml-name-validator@^4.0.0: version "4.0.0" @@ -7105,8 +7113,8 @@ yocto-queue@^0.1.0: integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== zustand@^4.4.7: - version "4.5.2" - resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.2.tgz#fddbe7cac1e71d45413b3682cdb47b48034c3848" - integrity sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g== + version "4.5.4" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.4.tgz#63abdd81edfb190bc61e0bbae045cc4d52158a05" + integrity sha512-/BPMyLKJPtFEvVL0E9E9BTUM63MNyhPGlvxk1XjrfWTUlV+BR8jufjsovHzrtR6YNcBEcL7cMHovL1n9xHawEg== dependencies: use-sync-external-store "1.2.0" From 68d297404755f287d629c43999f7b014ab72f78c Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Fri, 19 Jul 2024 18:40:48 +0300 Subject: [PATCH 10/17] yarn lock --- package.json | 4 ++-- yarn.lock | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 939238c..db1ff6e 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "axios-mock-adapter": "^1.22.0", "bignumber.js": "9.x", "esbuild": "^0.21.1", - "esbuild-node-externals": "^1.14.0", + "esbuild-node-externals": "1.14.0", "eslint": "9.1.1", "eslint-config-prettier": "9.1.0", "eslint-config-standard": "17.1.0", @@ -79,7 +79,7 @@ "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "msw": "1.3.1", - "node-stdlib-browser": "^1.2.0", + "node-stdlib-browser": "1.2.0", "prettier": "3.2.5", "protobufjs": "^7.3.0", "react": "^18.3.1", diff --git a/yarn.lock b/yarn.lock index bc1fb27..c9fd9b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3208,7 +3208,7 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild-node-externals@^1.14.0: +esbuild-node-externals@1.14.0: version "1.14.0" resolved "https://registry.yarnpkg.com/esbuild-node-externals/-/esbuild-node-externals-1.14.0.tgz#fc2950c67a068dc2b538fd1381ad7d8e20a6f54d" integrity sha512-jMWnTlCII3cLEjR5+u0JRSTJuP+MgbjEHKfwSIAI41NgLQ0ZjfzjchlbEn0r7v2u5gCBMSEYvYlkO7GDG8gG3A== @@ -5335,7 +5335,7 @@ node-releases@^2.0.14: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.17.tgz#d74bc4fec38d839eec5db2a3c9c963d4f33cb366" integrity sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA== -node-stdlib-browser@^1.2.0: +node-stdlib-browser@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/node-stdlib-browser/-/node-stdlib-browser-1.2.0.tgz#5ddcfdf4063b88fb282979a1aa6ddab9728d5e4c" integrity sha512-VSjFxUhRhkyed8AtLwSCkMrJRfQ3e2lGtG3sP6FEgaLKBBbxM/dLfjRe1+iLhjvyLFW3tBQ8+c0pcOtXGbAZJg== From 0cb8598336164bd045fe00ef5dcacc159ab10a2c Mon Sep 17 00:00:00 2001 From: Ciprian Draghici Date: Tue, 23 Jul 2024 10:18:46 +0300 Subject: [PATCH 11/17] Make middlewares registration more scalable (#11) * make middlewares registration more scalable * changelog update --- CHANGELOG.md | 1 + src/store/middleware/applyMiddleware.ts | 7 ------- src/store/middleware/applyMiddlewares.ts | 8 ++++++++ src/store/middleware/index.ts | 2 +- src/store/store.ts | 5 ++--- 5 files changed, 12 insertions(+), 11 deletions(-) delete mode 100644 src/store/middleware/applyMiddleware.ts create mode 100644 src/store/middleware/applyMiddlewares.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 6073711..60c08f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- [Make middlewares registration more scalable](https://github.com/multiversx/mx-sdk-dapp-core/pull/11) - [Fix Node Polyfills](https://github.com/multiversx/mx-sdk-dapp-core/pull/10) - [Removed chain id from network slice & added esbuild and absolute imports](https://github.com/multiversx/mx-sdk-dapp-core/pull/3) - [Reverted absolute imports](https://github.com/multiversx/mx-sdk-dapp-core/pull/2) diff --git a/src/store/middleware/applyMiddleware.ts b/src/store/middleware/applyMiddleware.ts deleted file mode 100644 index ab0d0dd..0000000 --- a/src/store/middleware/applyMiddleware.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { StoreType } from '../store.types'; -import { StoreApi } from 'zustand/vanilla'; -import { logoutMiddleware } from './logoutMiddleware'; - -export const applyMiddleware = (store: StoreApi) => { - store.subscribe(logoutMiddleware); -}; diff --git a/src/store/middleware/applyMiddlewares.ts b/src/store/middleware/applyMiddlewares.ts new file mode 100644 index 0000000..e141f6e --- /dev/null +++ b/src/store/middleware/applyMiddlewares.ts @@ -0,0 +1,8 @@ +import { StoreType } from '../store.types'; +import { StoreApi } from 'zustand/vanilla'; +import { logoutMiddleware } from './logoutMiddleware'; + +export const applyMiddlewares = (state: StoreType, _prevState: StoreType) => { + logoutMiddleware(state); + // TODO add more middlewares here and eventually use _prevState if applicable +}; \ No newline at end of file diff --git a/src/store/middleware/index.ts b/src/store/middleware/index.ts index 6f49a51..7e2f625 100644 --- a/src/store/middleware/index.ts +++ b/src/store/middleware/index.ts @@ -1 +1 @@ -export * from './applyMiddleware'; +export * from './applyMiddlewares'; diff --git a/src/store/store.ts b/src/store/store.ts index 0fdcbbc..917579e 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -11,7 +11,7 @@ import { accountSlice } from './slices/account/accountSlice'; import { createBoundedUseStore } from './createBoundedStore'; import { loginInfoSlice } from './slices/loginInfo'; import { StoreType } from './store.types'; -import { applyMiddleware } from './middleware/applyMiddleware'; +import { applyMiddlewares } from './middleware/applyMiddlewares'; export type MutatorsIn = [ ['zustand/devtools', never], @@ -41,8 +41,7 @@ export const createDAppStore = (getStorageCallback: StorageCallback) => { ) ) ); - applyMiddleware(store); - + store.subscribe(applyMiddlewares); return store; }; From bcc37e03af4d85f133e5f6123b2b815148ec64ce Mon Sep 17 00:00:00 2001 From: Ciprian Draghici Date: Thu, 25 Jul 2024 17:23:24 +0300 Subject: [PATCH 12/17] Generic login + ExtensionProvider login (#12) * implement generic login and finalize the login with extension provider * refactoring * refactoring * refactoring around provider type and login methods * support for normal login and login with native token * refactoring, add initDapp function, set nativeAuthCofig at init * revert minify value * fix import * refactoring * refactoring * refactoring * add nativeAuthConfig selector * refactoring empty provider * changelog update * revert minify value --- CHANGELOG.md | 1 + esbuild.js | 5 +- src/core/ProviderFactory.ts | 88 -------------- src/core/index.ts | 2 +- src/core/methods/init/init.ts | 30 +++++ .../methods/login/helpers/getLoginService.ts | 6 +- src/core/methods/login/login.ts | 111 ++++++++++++++++++ src/core/methods/login/webWalletLogin.ts | 6 +- src/core/methods/logout/logout.ts | 10 +- src/core/providers/ProviderFactory.ts | 80 +++++++++++++ src/core/providers/accountProvider.ts | 8 +- src/core/providers/helpers/emptyProvider.ts | 25 ++-- src/core/providers/helpers/utils.ts | 21 ++-- .../providers/types/providerFactory.types.ts | 37 ++++++ ...AuthConfig.ts => buildNativeAuthConfig.ts} | 19 +-- .../methods/getDefaultNativeAuthConfig.ts | 10 ++ src/services/nativeAuth/methods/index.ts | 2 +- src/services/nativeAuth/nativeAuth.ts | 7 +- .../actions/loginInfo/loginInfoActions.ts | 22 +++- .../actions/sharedActions/sharedActions.ts | 11 +- src/store/selectors/loginInfoSelectors.ts | 3 + src/store/slices/loginInfo/loginInfo.types.ts | 4 +- src/store/slices/loginInfo/loginInfoSlice.ts | 3 +- src/types/dappProvider.types.ts | 32 ----- src/types/enums.types.ts | 13 -- src/types/index.ts | 3 +- src/types/login.types.ts | 2 +- src/types/nativeAuth.types.ts | 17 --- src/utils/account/getAddress.ts | 6 + src/utils/account/getIsLoggedIn.ts | 5 + 30 files changed, 357 insertions(+), 232 deletions(-) delete mode 100644 src/core/ProviderFactory.ts create mode 100644 src/core/methods/init/init.ts create mode 100644 src/core/methods/login/login.ts create mode 100644 src/core/providers/ProviderFactory.ts create mode 100644 src/core/providers/types/providerFactory.types.ts rename src/services/nativeAuth/methods/{getNativeAuthConfig.ts => buildNativeAuthConfig.ts} (50%) create mode 100644 src/services/nativeAuth/methods/getDefaultNativeAuthConfig.ts delete mode 100644 src/types/dappProvider.types.ts delete mode 100644 src/types/nativeAuth.types.ts create mode 100644 src/utils/account/getAddress.ts create mode 100644 src/utils/account/getIsLoggedIn.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 60c08f1..5d64c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- [Generic login + ExtensionProvider login](https://github.com/multiversx/mx-sdk-dapp-core/pull/12) - [Make middlewares registration more scalable](https://github.com/multiversx/mx-sdk-dapp-core/pull/11) - [Fix Node Polyfills](https://github.com/multiversx/mx-sdk-dapp-core/pull/10) - [Removed chain id from network slice & added esbuild and absolute imports](https://github.com/multiversx/mx-sdk-dapp-core/pull/3) diff --git a/esbuild.js b/esbuild.js index 632b424..4e22a75 100644 --- a/esbuild.js +++ b/esbuild.js @@ -38,10 +38,7 @@ const executeBuild = () => process: 'process', Buffer: 'Buffer' }, - plugins: [ - plugin(stdLibBrowser), - nodeExternalsPlugin(), - ] + plugins: [plugin(stdLibBrowser), nodeExternalsPlugin()] }) .then(() => { console.log( diff --git a/src/core/ProviderFactory.ts b/src/core/ProviderFactory.ts deleted file mode 100644 index 66791ca..0000000 --- a/src/core/ProviderFactory.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { Transaction } from '@multiversx/sdk-core'; -import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; - -export interface IProvider { - login: (options?: { token?: string }) => Promise; - logout: () => Promise; - signTransactions: (transaction: Transaction[]) => Promise; - setAddress: (address: string) => IProvider; - setShouldShowConsentPopup?: (shouldShow: boolean) => void; -} -export interface IProviderConfig { - network: { - walletAddress: string; - }; -} -export interface IProviderFactory { - type: ProviderTypeEnum; - config: IProviderConfig; - address?: string; -} - -export interface IProviderRecreateFactory extends IProviderFactory { - address: string; -} - -export enum ProviderTypeEnum { - iframe = 'iframe', - crossWindow = 'crossWindow' -} - -export class ProviderFactory { - public static async create({ - type, - config: { - network: { walletAddress } - }, - address - }: IProviderFactory): Promise { - let createdProvider: IProvider; - - switch (type) { - // case ProviderTypeEnum.iframe: { - // const provider = await ProviderFactory.getIframeProvider({ - // walletAddress, - // }); - // createdProvider = provider as unknown as IProvider; - // break; - // } - - case ProviderTypeEnum.crossWindow: { - const provider = await ProviderFactory.getCrossWindowProvider({ - walletAddress - }); - createdProvider = provider as unknown as IProvider; - break; - } - - default: - const provider = await ProviderFactory.getCrossWindowProvider({ - walletAddress - }); - createdProvider = provider as unknown as IProvider; - break; - } - - if (address) { - createdProvider.setAddress(address); - } - - return createdProvider; - } - - public static async reCreate( - config: IProviderRecreateFactory - ): Promise { - return await ProviderFactory.create(config); - } - - private static async getCrossWindowProvider({ - walletAddress - }: Partial) { - // CrossWindowProvider.getInstance().clearInstance(); - const provider = CrossWindowProvider.getInstance(); - await provider.init(); - provider.setWalletUrl(String(walletAddress)); - return provider; - } -} diff --git a/src/core/index.ts b/src/core/index.ts index 864b2df..95a1e56 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,2 +1,2 @@ -export * from './ProviderFactory'; +export * from './providers/ProviderFactory'; export * from './Logger'; diff --git a/src/core/methods/init/init.ts b/src/core/methods/init/init.ts new file mode 100644 index 0000000..1e7c369 --- /dev/null +++ b/src/core/methods/init/init.ts @@ -0,0 +1,30 @@ +import { initStore } from 'store/store'; +import { defaultStorageCallback, StorageCallback } from 'store/storage'; +import { setTokenLoginNativeAuthTokenConfig } from 'store/actions/loginInfo/loginInfoActions'; +import { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types'; +import { getDefaultNativeAuthConfig } from 'services/nativeAuth/methods/getDefaultNativeAuthConfig'; + +type InitAppType = { + storage?: { + getStorageCallback: StorageCallback; + }; + nativeAuth?: boolean | NativeAuthConfigType; +}; +const defaultInitAppProps = { + storage: { + getStorageCallback: defaultStorageCallback + } +}; +export const initializeDApp = (props?: InitAppType) => { + const { storage, nativeAuth } = { ...defaultInitAppProps, ...props }; + initStore(storage.getStorageCallback); + + if (nativeAuth) { + const nativeAuthConfig: NativeAuthConfigType = + typeof nativeAuth === 'boolean' + ? getDefaultNativeAuthConfig() + : nativeAuth; + + setTokenLoginNativeAuthTokenConfig(nativeAuthConfig); + } +}; diff --git a/src/core/methods/login/helpers/getLoginService.ts b/src/core/methods/login/helpers/getLoginService.ts index 0d8f3c5..6cf47f3 100644 --- a/src/core/methods/login/helpers/getLoginService.ts +++ b/src/core/methods/login/helpers/getLoginService.ts @@ -1,12 +1,12 @@ import { Address, SignableMessage } from '@multiversx/sdk-core'; import { nativeAuth } from 'services/nativeAuth'; -import { getNativeAuthConfig } from 'services/nativeAuth/methods'; +import { buildNativeAuthConfig } from 'services/nativeAuth/methods'; import { networkSelector, tokenLoginSelector } from 'store/selectors'; import { getState } from 'store/store'; import { OnProviderLoginType } from 'types/login.types'; import { getAccount } from '../../account/getAccount'; import { setTokenLogin } from 'store/actions/loginInfo/loginInfoActions'; -import { NativeAuthConfigType } from 'types/nativeAuth.types'; +import { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types'; const getApiAddress = ( apiAddress: string, @@ -29,7 +29,7 @@ export const getLoginService = (config?: OnProviderLoginType['nativeAuth']) => { const apiAddress = getApiAddress(network.apiAddress, config); - const configuration = getNativeAuthConfig({ + const configuration = buildNativeAuthConfig({ ...(config === true ? {} : config), ...(apiAddress ? { apiAddress } : {}) }); diff --git a/src/core/methods/login/login.ts b/src/core/methods/login/login.ts new file mode 100644 index 0000000..b3e0ffa --- /dev/null +++ b/src/core/methods/login/login.ts @@ -0,0 +1,111 @@ +import { nativeAuth } from 'services/nativeAuth'; +import { setAddress } from 'store/actions/account'; +import { + setProviderType, + setTokenLogin +} from 'store/actions/loginInfo/loginInfoActions'; +import { setAccountProvider } from 'core/providers/accountProvider'; +import { + IProvider, + IProviderFactory +} from 'core/providers/types/providerFactory.types'; +import { ProviderFactory } from 'core/providers/ProviderFactory'; +import { nativeAuthConfigSelector } from 'store/selectors'; +import { getState } from 'store/store'; +import { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types'; +import { getIsLoggedIn } from 'utils/account/getIsLoggedIn'; +import { getAddress } from 'utils/account/getAddress'; + +async function loginWithoutNativeToken(provider: IProvider) { + await provider.login(); + + const address = provider.getAddress?.(); + + if (!address) { + throw new Error('Address not found'); + } + + setAddress(address); + + return { + address + }; +} + +async function loginWithNativeToken( + provider: IProvider, + nativeAuthConfig: NativeAuthConfigType +) { + const nativeAuthClient = nativeAuth(nativeAuthConfig); + + const loginToken = await nativeAuthClient.initialize({ + noCache: true + }); + + await provider.login({ token: loginToken }); + + const address = provider.getAddress?.(); + const signature = provider.getTokenLoginSignature?.(); + + if (!address) { + throw new Error('Address not found'); + } + + if (!signature) { + throw new Error('Signature not found'); + } + + const nativeAuthToken = nativeAuthClient.getToken({ + address, + token: loginToken, + signature + }); + + setAddress(address); + setTokenLogin({ + loginToken, + signature, + nativeAuthToken, + nativeAuthConfig + }); + + return { + address, + signature, + nativeAuthToken, + loginToken, + nativeAuthConfig + }; +} + +export const login = async ({ + providerConfig +}: { + providerConfig: IProviderFactory; +}) => { + const loggedIn = getIsLoggedIn(); + + if (loggedIn) { + console.warn('Already logged in with:', getAddress()); + return; + } + + const factory = new ProviderFactory(); + const provider = await factory.create(providerConfig); + + if (!provider) { + throw new Error('Provider not found'); + } + + await provider.init?.(); + setAccountProvider(provider); + setProviderType(providerConfig.type); + + const nativeAuthConfig = nativeAuthConfigSelector(getState()); + + if (nativeAuthConfig) { + return await loginWithNativeToken(provider, nativeAuthConfig); + } + + return await loginWithoutNativeToken(provider); +}; diff --git a/src/core/methods/login/webWalletLogin.ts b/src/core/methods/login/webWalletLogin.ts index 8875f0e..4112087 100644 --- a/src/core/methods/login/webWalletLogin.ts +++ b/src/core/methods/login/webWalletLogin.ts @@ -1,4 +1,3 @@ -import { LoginMethodsEnum } from 'types/enums.types'; import { OnProviderLoginType } from 'types/login.types'; import { getWindowLocation } from 'utils/window/getWindowLocation'; import { getLoginService } from './helpers/getLoginService'; @@ -14,6 +13,7 @@ import { setAccount } from 'store/actions/account/accountActions'; import { getLatestNonce } from 'utils/account/getLatestNonce'; import { AccountType } from 'types/account.types'; import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; +import { ProviderTypeEnum } from '../../providers/types/providerFactory.types'; export const webWalletLogin = async ({ token: tokenToSign, @@ -100,7 +100,7 @@ export const webWalletLogin = async ({ loginAction({ address: account.address, - loginMethod: LoginMethodsEnum.crossWindow + providerType: ProviderTypeEnum.crossWindow }); const newAccount: AccountType = { @@ -112,7 +112,7 @@ export const webWalletLogin = async ({ return newAccount; } catch (error) { - console.error('error loging in', error); + console.error('error logging in', error); throw error; } }; diff --git a/src/core/methods/logout/logout.ts b/src/core/methods/logout/logout.ts index acfd0db..b29a2bc 100644 --- a/src/core/methods/logout/logout.ts +++ b/src/core/methods/logout/logout.ts @@ -1,12 +1,11 @@ import { storage } from 'storage'; import { localStorageKeys } from 'storage/local'; -import { LoginMethodsEnum } from 'types'; import { getAddress } from '../account/getAddress'; import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; import { logoutAction } from 'store/actions/sharedActions/sharedActions'; -import { getWebviewToken } from '../account/getWebviewToken'; import { getAccountProvider } from 'core/providers/accountProvider'; import { getProviderType } from 'core/providers/helpers/utils'; +import { ProviderTypeEnum } from 'core/providers/types/providerFactory.types'; const broadcastLogoutAcrossTabs = (address: string) => { const storedData = storage.local?.getItem(localStorageKeys.logoutEvent); @@ -35,7 +34,6 @@ export type LogoutPropsType = { }; export async function logout( - shouldAttemptReLogin = Boolean(getWebviewToken()), options = { shouldBroadcastLogoutAcrossTabs: true, hasConsentPopup: false @@ -45,10 +43,6 @@ export async function logout( const provider = getAccountProvider(); const providerType = getProviderType(provider); - if (shouldAttemptReLogin && provider?.relogin != null) { - return provider.relogin(); - } - if (options.shouldBroadcastLogoutAcrossTabs) { broadcastLogoutAcrossTabs(address); } @@ -58,7 +52,7 @@ export async function logout( if ( options.hasConsentPopup && - providerType === LoginMethodsEnum.crossWindow + providerType === ProviderTypeEnum.crossWindow ) { (provider as unknown as CrossWindowProvider).setShouldShowConsentPopup( true diff --git a/src/core/providers/ProviderFactory.ts b/src/core/providers/ProviderFactory.ts new file mode 100644 index 0000000..d11d1c0 --- /dev/null +++ b/src/core/providers/ProviderFactory.ts @@ -0,0 +1,80 @@ +import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; +import { ExtensionProvider } from '@multiversx/sdk-extension-provider'; +import { + IProvider, + IProviderConfig, + IProviderFactory, + ProviderTypeEnum +} from './types/providerFactory.types'; + +export class ProviderFactory { + public async create({ + type, + config, + customProvider + }: IProviderFactory): Promise { + let createdProvider: IProvider | undefined; + + switch (type) { + // case ProviderTypeEnum.iframe: { + // const provider = await ProviderFactory.getIframeProvider({ + // walletAddress, + // }); + // createdProvider = provider as unknown as IProvider; + // break; + // } + + case ProviderTypeEnum.extension: { + const provider = await this.getExtensionProvider(); + createdProvider = provider as unknown as IProvider; + + createdProvider.getAddress = () => { + return provider.account.address; + }; + + createdProvider.getTokenLoginSignature = () => { + return provider.account.signature; + }; + + break; + } + + case ProviderTypeEnum.crossWindow: { + const { walletAddress } = config.network; + + const provider = await this.getCrossWindowProvider({ + walletAddress + }); + createdProvider = provider as unknown as IProvider; + + break; + } + + case ProviderTypeEnum.custom: { + createdProvider = customProvider; + break; + } + + default: + break; + } + + return createdProvider; + } + + private async getCrossWindowProvider({ + walletAddress + }: Partial) { + // CrossWindowProvider.getInstance().clearInstance(); + const provider = CrossWindowProvider.getInstance(); + await provider.init(); + provider.setWalletUrl(String(walletAddress)); + return provider; + } + + private async getExtensionProvider() { + const provider = ExtensionProvider.getInstance(); + await provider.init(); + return provider; + } +} diff --git a/src/core/providers/accountProvider.ts b/src/core/providers/accountProvider.ts index 44f1ba1..bdce2ab 100644 --- a/src/core/providers/accountProvider.ts +++ b/src/core/providers/accountProvider.ts @@ -1,8 +1,8 @@ -import { IDappProvider } from 'types/dappProvider.types'; import { emptyProvider } from './helpers/emptyProvider'; import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; +import { IProvider } from 'core/providers/types/providerFactory.types'; -export type ProvidersType = IDappProvider | CrossWindowProvider; +export type ProvidersType = IProvider | CrossWindowProvider; let accountProvider: ProvidersType = emptyProvider; @@ -12,6 +12,6 @@ export function setAccountProvider( accountProvider = provider; } -export function getAccountProvider(): IDappProvider { - return (accountProvider as IDappProvider) || emptyProvider; +export function getAccountProvider(): IProvider { + return (accountProvider as IProvider) || emptyProvider; } diff --git a/src/core/providers/helpers/emptyProvider.ts b/src/core/providers/helpers/emptyProvider.ts index 4511602..95d81f6 100644 --- a/src/core/providers/helpers/emptyProvider.ts +++ b/src/core/providers/helpers/emptyProvider.ts @@ -1,6 +1,6 @@ import { SignableMessage, Transaction } from '@multiversx/sdk-core'; -import { IDappProvider } from 'types'; import { EngineTypes } from 'utils/walletconnect/__sdkWalletconnectProvider'; +import { IProvider } from 'core/providers/types/providerFactory.types'; export const DAPP_INIT_ROUTE = '/dapp/init'; @@ -8,7 +8,7 @@ const notInitializedError = (caller: string) => { return `Unable to perform ${caller}, Provider not initialized`; }; -export class EmptyProvider implements IDappProvider { +export class EmptyProvider implements IProvider { init(): Promise { return Promise.resolve(false); } @@ -25,10 +25,6 @@ export class EmptyProvider implements IDappProvider { throw new Error(notInitializedError(`logout with options: ${options}`)); } - getAddress(): Promise { - throw new Error(notInitializedError('getAddress')); - } - isInitialized(): boolean { return false; } @@ -59,14 +55,9 @@ export class EmptyProvider implements IDappProvider { ); } - signTransactions( - transactions: [], - options?: TOptions - ): Promise { + signTransactions(transactions: T[]): Promise { throw new Error( - notInitializedError( - `signTransactions with transactions: ${transactions} options: ${options}` - ) + notInitializedError(`signTransactions with transactions: ${transactions}`) ); } @@ -103,8 +94,12 @@ export class EmptyProvider implements IDappProvider { ); } - ping?(): Promise { - return Promise.resolve(false); + getAddress(): string | undefined { + throw new Error(notInitializedError('getAddress')); + } + + getTokenLoginSignature(): string | undefined { + throw new Error(notInitializedError(`getSignature`)); } } diff --git a/src/core/providers/helpers/utils.ts b/src/core/providers/helpers/utils.ts index db82443..4b0341a 100644 --- a/src/core/providers/helpers/utils.ts +++ b/src/core/providers/helpers/utils.ts @@ -3,32 +3,31 @@ import { HWProvider } from '@multiversx/sdk-hw-provider'; import { MetamaskProvider } from '@multiversx/sdk-metamask-provider/out/metamaskProvider'; import { OperaProvider } from '@multiversx/sdk-opera-provider'; import { WalletProvider } from '@multiversx/sdk-web-wallet-provider'; -import { LoginMethodsEnum } from 'types/enums.types'; import { WalletConnectV2Provider } from 'utils/walletconnect/__sdkWalletconnectProvider'; import { EmptyProvider } from './emptyProvider'; import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; +import { ProviderTypeEnum } from 'core/providers/types/providerFactory.types'; export const getProviderType = ( provider?: TProvider | null -): LoginMethodsEnum => { +): ProviderTypeEnum => { switch (provider?.constructor) { case WalletProvider: - return LoginMethodsEnum.wallet; + return ProviderTypeEnum.webhook; case WalletConnectV2Provider: - return LoginMethodsEnum.walletconnectv2; + return ProviderTypeEnum.walletConnect; case HWProvider: - return LoginMethodsEnum.ledger; + return ProviderTypeEnum.hardware; case ExtensionProvider: - return LoginMethodsEnum.extension; + return ProviderTypeEnum.extension; case MetamaskProvider: - return LoginMethodsEnum.metamask; + return ProviderTypeEnum.metamask; case OperaProvider: - return LoginMethodsEnum.opera; + return ProviderTypeEnum.opera; case CrossWindowProvider: - return LoginMethodsEnum.crossWindow; + return ProviderTypeEnum.crossWindow; case EmptyProvider: - return LoginMethodsEnum.none; default: - return LoginMethodsEnum.extra; + return ProviderTypeEnum.none; } }; diff --git a/src/core/providers/types/providerFactory.types.ts b/src/core/providers/types/providerFactory.types.ts new file mode 100644 index 0000000..4bc2ed7 --- /dev/null +++ b/src/core/providers/types/providerFactory.types.ts @@ -0,0 +1,37 @@ +import type { IDAppProviderBase } from '@multiversx/sdk-dapp-utils'; + +export interface IProvider extends IDAppProviderBase { + init: () => Promise; + // TODO change return type to { address: string, signature: string } and also change the return type in IDAppProviderBase. + login: (options?: { token?: string }) => Promise; + logout: () => Promise; + setShouldShowConsentPopup?: (shouldShow: boolean) => void; + getAddress(): string | undefined; + // TODO will be removed as soon as the new login method is implemented in the same way for all providers + getTokenLoginSignature(): string | undefined; +} + +export interface IProviderConfig { + network: { + walletAddress: string; + }; +} + +export enum ProviderTypeEnum { + iframe = 'iframe', + crossWindow = 'crossWindow', + extension = 'extension', + walletConnect = 'walletConnect', + hardware = 'hardware', + opera = 'opera', + metamask = 'metamask', + webhook = 'webhook', + custom = 'custom', + none = '' +} + +export interface IProviderFactory { + type: ProviderTypeEnum; + config: IProviderConfig; + customProvider?: IProvider; +} diff --git a/src/services/nativeAuth/methods/getNativeAuthConfig.ts b/src/services/nativeAuth/methods/buildNativeAuthConfig.ts similarity index 50% rename from src/services/nativeAuth/methods/getNativeAuthConfig.ts rename to src/services/nativeAuth/methods/buildNativeAuthConfig.ts index 08bc3e8..51b9ce7 100644 --- a/src/services/nativeAuth/methods/getNativeAuthConfig.ts +++ b/src/services/nativeAuth/methods/buildNativeAuthConfig.ts @@ -1,18 +1,10 @@ -import { getWindowLocation } from 'utils/window/getWindowLocation'; -import { NativeAuthConfigType } from '../../../types/nativeAuth.types'; +import { NativeAuthConfigType } from '../nativeAuth.types'; +import { getDefaultNativeAuthConfig } from './getDefaultNativeAuthConfig'; -const defaultNativeAuthConfig = { - origin: getWindowLocation().origin, - apiAddress: 'https://api.multiversx.com', - expirySeconds: 60 * 60 * 24, // one day - tokenExpirationToastWarningSeconds: 5 * 60 // five minutes -}; +export const buildNativeAuthConfig = (config?: NativeAuthConfigType) => { + const defaultNativeAuthConfig = getDefaultNativeAuthConfig(); -export const getNativeAuthConfig = (config?: NativeAuthConfigType | true) => { - if (config === true) { - return defaultNativeAuthConfig; - } - const nativeAuthConfig = { + return { origin: config?.origin ?? defaultNativeAuthConfig.origin, blockHashShard: config?.blockHashShard, expirySeconds: @@ -25,5 +17,4 @@ export const getNativeAuthConfig = (config?: NativeAuthConfigType | true) => { gatewayUrl: config?.gatewayUrl, extraRequestHeaders: config?.extraRequestHeaders ?? {} }; - return nativeAuthConfig; }; diff --git a/src/services/nativeAuth/methods/getDefaultNativeAuthConfig.ts b/src/services/nativeAuth/methods/getDefaultNativeAuthConfig.ts new file mode 100644 index 0000000..0ae7fe4 --- /dev/null +++ b/src/services/nativeAuth/methods/getDefaultNativeAuthConfig.ts @@ -0,0 +1,10 @@ +import { getWindowLocation } from 'utils/window/getWindowLocation'; + +export const getDefaultNativeAuthConfig = () => { + return { + origin: getWindowLocation().origin, + apiAddress: 'https://api.multiversx.com', + expirySeconds: 60 * 60 * 24, // one day + tokenExpirationToastWarningSeconds: 5 * 60 // five minutes + }; +}; diff --git a/src/services/nativeAuth/methods/index.ts b/src/services/nativeAuth/methods/index.ts index d60dcb4..8928cf0 100644 --- a/src/services/nativeAuth/methods/index.ts +++ b/src/services/nativeAuth/methods/index.ts @@ -1,2 +1,2 @@ export * from './getTokenExpiration'; -export * from './getNativeAuthConfig'; +export * from './buildNativeAuthConfig'; diff --git a/src/services/nativeAuth/nativeAuth.ts b/src/services/nativeAuth/nativeAuth.ts index 060bc59..00af903 100644 --- a/src/services/nativeAuth/nativeAuth.ts +++ b/src/services/nativeAuth/nativeAuth.ts @@ -1,12 +1,12 @@ import { NativeAuthClient } from '@multiversx/sdk-native-auth-client'; -import { NativeAuthConfigType } from 'types/nativeAuth.types'; import { getLatestBlockHash, LatestBlockHashType } from './helpers/getLatestBlockHash'; -import { getNativeAuthConfig, getTokenExpiration } from './methods'; +import { buildNativeAuthConfig, getTokenExpiration } from './methods'; +import { NativeAuthConfigType } from './nativeAuth.types'; interface NativeAuthInitType { extraInfo?: { [key: string]: string }; @@ -23,7 +23,7 @@ export const nativeAuth = (config?: NativeAuthConfigType) => { extraInfo: extraInfoFromConfig, gatewayUrl, extraRequestHeaders - } = getNativeAuthConfig(config) as NativeAuthConfigType; + } = buildNativeAuthConfig(config); const nativeAuthClient = new NativeAuthClient({ origin, @@ -76,7 +76,6 @@ export const nativeAuth = (config?: NativeAuthConfigType) => { }): string => nativeAuthClient.getToken(address, token, signature); return { - getNativeAuthConfig, initialize, getToken, getTokenExpiration diff --git a/src/store/actions/loginInfo/loginInfoActions.ts b/src/store/actions/loginInfo/loginInfoActions.ts index 71d6a4f..887a670 100644 --- a/src/store/actions/loginInfo/loginInfoActions.ts +++ b/src/store/actions/loginInfo/loginInfoActions.ts @@ -1,4 +1,3 @@ -import { LoginMethodsEnum } from 'types/enums.types'; import { TokenLoginType } from 'types/login.types'; import { LedgerLoginType, @@ -6,10 +5,12 @@ import { WalletConnectLoginType } from 'store/slices/loginInfo/loginInfo.types'; import { getStore } from 'store/store'; +import { ProviderTypeEnum } from 'core/providers/types/providerFactory.types'; +import { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types'; -export const setLoginMethod = (loginMethod: LoginMethodsEnum) => +export const setProviderType = (providerType: ProviderTypeEnum) => getStore().setState(({ loginInfo: state }) => { - state.loginMethod = loginMethod; + state.providerType = providerType; }); export const setTokenLogin = (tokenLogin: TokenLoginType) => @@ -24,6 +25,21 @@ export const setTokenLoginSignature = (signature: string) => } }); +export const setTokenLoginNativeAuthTokenConfig = ( + nativeAuthConfig: NativeAuthConfigType +) => + getStore().setState(({ loginInfo: state }) => { + if (state?.tokenLogin != null) { + state.tokenLogin.nativeAuthConfig = nativeAuthConfig; + return; + } + + state.tokenLogin = { + nativeAuthConfig, + loginToken: '' + }; + }); + export const setWalletLogin = (walletLogin: LoginInfoType | null) => getStore().setState(({ loginInfo: state }) => { state.walletLogin = walletLogin; diff --git a/src/store/actions/sharedActions/sharedActions.ts b/src/store/actions/sharedActions/sharedActions.ts index a45bf3b..e03b1af 100644 --- a/src/store/actions/sharedActions/sharedActions.ts +++ b/src/store/actions/sharedActions/sharedActions.ts @@ -1,17 +1,20 @@ import { Address } from '@multiversx/sdk-core/out'; import { getStore } from '../../store'; -import { LoginMethodsEnum } from 'types/enums.types'; import { resetStore } from 'store/middleware/logoutMiddleware'; +import { ProviderTypeEnum } from 'core/providers/types/providerFactory.types'; export const logoutAction = () => getStore().setState(resetStore); export interface LoginActionPayloadType { address: string; - loginMethod: LoginMethodsEnum; + providerType: ProviderTypeEnum; } -export const loginAction = ({ address, loginMethod }: LoginActionPayloadType) => +export const loginAction = ({ + address, + providerType +}: LoginActionPayloadType) => getStore().setState(({ account, loginInfo }) => { account.address = address; account.publicKey = new Address(address).hex(); - loginInfo.loginMethod = loginMethod; + loginInfo.providerType = providerType; }); diff --git a/src/store/selectors/loginInfoSelectors.ts b/src/store/selectors/loginInfoSelectors.ts index f8251c9..4453da2 100644 --- a/src/store/selectors/loginInfoSelectors.ts +++ b/src/store/selectors/loginInfoSelectors.ts @@ -4,3 +4,6 @@ export const loginInfoSelector = ({ loginInfo }: StoreType) => loginInfo; export const tokenLoginSelector = ({ loginInfo }: StoreType) => loginInfo.tokenLogin; + +export const nativeAuthConfigSelector = ({ loginInfo }: StoreType) => + loginInfo.tokenLogin?.nativeAuthConfig; diff --git a/src/store/slices/loginInfo/loginInfo.types.ts b/src/store/slices/loginInfo/loginInfo.types.ts index 4201306..2ff1f3c 100644 --- a/src/store/slices/loginInfo/loginInfo.types.ts +++ b/src/store/slices/loginInfo/loginInfo.types.ts @@ -1,5 +1,5 @@ -import { LoginMethodsEnum } from 'types/enums.types'; import { TokenLoginType } from 'types/login.types'; +import { ProviderTypeEnum } from 'core/providers/types/providerFactory.types'; export interface WalletConnectLoginType { loginType: string; @@ -18,7 +18,7 @@ export interface LoginInfoType { } export interface LoginInfoSliceType { - loginMethod: LoginMethodsEnum; + providerType: ProviderTypeEnum | null; walletConnectLogin: WalletConnectLoginType | null; ledgerLogin: LedgerLoginType | null; tokenLogin: TokenLoginType | null; diff --git a/src/store/slices/loginInfo/loginInfoSlice.ts b/src/store/slices/loginInfo/loginInfoSlice.ts index fb455d0..42a1676 100644 --- a/src/store/slices/loginInfo/loginInfoSlice.ts +++ b/src/store/slices/loginInfo/loginInfoSlice.ts @@ -1,10 +1,9 @@ -import { LoginMethodsEnum } from 'types/enums.types'; import { StateCreator } from 'zustand/vanilla'; import { StoreType, MutatorsIn } from 'store/store.types'; import { LoginInfoSliceType } from './loginInfo.types'; export const initialState: LoginInfoSliceType = { - loginMethod: LoginMethodsEnum.none, + providerType: null, walletConnectLogin: null, ledgerLogin: null, tokenLogin: null, diff --git a/src/types/dappProvider.types.ts b/src/types/dappProvider.types.ts deleted file mode 100644 index 7260263..0000000 --- a/src/types/dappProvider.types.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Transaction } from '@multiversx/sdk-core'; -import type { IDAppProviderBase } from '@multiversx/sdk-dapp-utils/out/models/dappProviderBase'; -import { EngineTypes } from 'utils/walletconnect/__sdkWalletconnectProvider'; -import { Nullable } from './misc.types'; - -export interface DappOptions { - callbackUrl?: string; -} - -export interface IDappProvider extends IDAppProviderBase { - init?(): Promise; - getAddress(): Promise; - isInitialized(): boolean; - isConnected(): Promise; - sendTransaction?( - transaction: Transaction, - options?: DappOptions - ): Promise; - sendCustomMessage?({ - method, - params - }: { - method: string; - params: any; - }): Promise; - sendCustomRequest?(options?: { - request: EngineTypes.RequestParams['request']; - }): Promise; - ping?(): Promise; - relogin?: () => Promise>; - setShouldShowConsentPopup?: (shouldShow: boolean) => void; -} diff --git a/src/types/enums.types.ts b/src/types/enums.types.ts index d3c0148..4af22bd 100644 --- a/src/types/enums.types.ts +++ b/src/types/enums.types.ts @@ -4,19 +4,6 @@ export enum EnvironmentsEnum { mainnet = 'mainnet' } -export enum LoginMethodsEnum { - ledger = 'ledger', - walletconnect = 'walletconnect', - walletconnectv2 = 'walletconnectv2', - wallet = 'wallet', - crossWindow = 'crossWindow', - extension = 'extension', - metamask = 'metamask', - opera = 'opera', - extra = 'extra', - none = '' -} - export enum TypesOfSmartContractCallsEnum { MultiESDTNFTTransfer = 'MultiESDTNFTTransfer', ESDTNFTTransfer = 'ESDTNFTTransfer' diff --git a/src/types/index.ts b/src/types/index.ts index a7a06d6..9d0a1f8 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,4 +1,3 @@ export * from './enums.types'; export * from './network.types'; -export * from './misc.types'; -export * from './dappProvider.types'; +export * from './misc.types'; \ No newline at end of file diff --git a/src/types/login.types.ts b/src/types/login.types.ts index 148fe05..4a5f053 100644 --- a/src/types/login.types.ts +++ b/src/types/login.types.ts @@ -1,4 +1,4 @@ -import { NativeAuthConfigType } from './nativeAuth.types'; +import { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types'; export interface OnProviderLoginType { token?: string; diff --git a/src/types/nativeAuth.types.ts b/src/types/nativeAuth.types.ts deleted file mode 100644 index c0c6b88..0000000 --- a/src/types/nativeAuth.types.ts +++ /dev/null @@ -1,17 +0,0 @@ -export interface NativeAuthConfigType { - origin?: string; - apiAddress?: string; - expirySeconds?: number; - blockHashShard?: number; - gatewayUrl?: string; - extraRequestHeaders?: { [key: string]: string }; - extraInfo?: { - [key: string]: string; - }; - /** - * Displays a logout toast warning before token expiration. Defaults to 5 minutes. - * - * If set to `null`, will not trigger any warning. - */ - tokenExpirationToastWarningSeconds?: number | null; -} diff --git a/src/utils/account/getAddress.ts b/src/utils/account/getAddress.ts new file mode 100644 index 0000000..c65e0a5 --- /dev/null +++ b/src/utils/account/getAddress.ts @@ -0,0 +1,6 @@ +import { addressSelector } from 'store/selectors'; +import { getState } from 'store/store'; + +export const getAddress = () => { + return addressSelector(getState()); +}; diff --git a/src/utils/account/getIsLoggedIn.ts b/src/utils/account/getIsLoggedIn.ts new file mode 100644 index 0000000..722dd1c --- /dev/null +++ b/src/utils/account/getIsLoggedIn.ts @@ -0,0 +1,5 @@ +import { getAddress } from './getAddress'; + +export const getIsLoggedIn = () => { + return Boolean(getAddress()); +}; From 13b7a9bc171a3d413ef23434db0b8da09fb0cb3e Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Tue, 27 Aug 2024 12:11:08 +0300 Subject: [PATCH 13/17] Make sdk-web-wallet-cross-window-provider as peer dep (#14) --- CHANGELOG.md | 2 ++ package.json | 3 ++- yarn.lock | 28 ++++++---------------------- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d64c9f..a8281c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] + +- [Added sdk-web-wallet-cross-window-provider as peer dependency](https://github.com/multiversx/mx-sdk-dapp-core/pull/12) - [Generic login + ExtensionProvider login](https://github.com/multiversx/mx-sdk-dapp-core/pull/12) - [Make middlewares registration more scalable](https://github.com/multiversx/mx-sdk-dapp-core/pull/11) - [Fix Node Polyfills](https://github.com/multiversx/mx-sdk-dapp-core/pull/10) diff --git a/package.json b/package.json index db1ff6e..8fcca57 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "@multiversx/sdk-native-auth-client": "^1.0.8", "@multiversx/sdk-opera-provider": "1.0.0-alpha.1", "@multiversx/sdk-wallet-connect-provider": "4.1.2", - "@multiversx/sdk-web-wallet-cross-window-provider": "0.2.0", "@multiversx/sdk-web-wallet-provider": "3.2.1", "@types/lodash": "^4.17.4", "isomorphic-fetch": "^3.0.0", @@ -47,6 +46,7 @@ "peerDependencies": { "@multiversx/sdk-core": ">= 13.0.0", "@multiversx/sdk-dapp-utils": "^0.0.1", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 0.4.2", "axios": ">=1.6.5", "bignumber.js": "9.x" }, @@ -56,6 +56,7 @@ "devDependencies": { "@multiversx/sdk-core": ">= 13.0.0", "@multiversx/sdk-dapp-utils": "^0.0.1", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 0.4.2", "@swc/core": "^1.4.17", "@swc/jest": "^0.2.36", "@types/node": "20.12.8", diff --git a/yarn.lock b/yarn.lock index c9fd9b1..9eef0d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1056,10 +1056,10 @@ "@walletconnect/utils" "2.12.2" bech32 "1.1.4" -"@multiversx/sdk-web-wallet-cross-window-provider@0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-0.2.0.tgz#0fab56632b77556349ed04d97bffdee02bc0d3d3" - integrity sha512-HyHKir96e8i3DnwtR1TOwINs9dOJH5kDjMOMjJvpqUlZm/07+O/KrWDxVRCAF7Qxhg0Lm09w6kfkBIoHfdux0w== +"@multiversx/sdk-web-wallet-cross-window-provider@>= 0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-0.4.2.tgz#49f6d7f526bd3ed16bb7c9eb85b084d710f2168f" + integrity sha512-0J99FYrMyQ9wzjGJKGc6nim2s4tZGMsmEClU/5lZDkTwgbfJd2LdMX2bm4yMYmBE8uUp/qOIHQOXFMZCW7VDFQ== dependencies: "@types/jest" "^29.5.11" "@types/qs" "6.9.10" @@ -6426,7 +6426,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -6440,13 +6440,6 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -7005,7 +6998,7 @@ word-wrap@^1.2.5: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -7023,15 +7016,6 @@ wrap-ansi@^6.0.1: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 89e2cd621cde6c662a28740f3667df51e661a0ab Mon Sep 17 00:00:00 2001 From: Ciprian Draghici Date: Thu, 29 Aug 2024 18:40:38 +0300 Subject: [PATCH 14/17] CrossWindow login (#13) * wip crosswindow provider login * implement login with crosswindow provider, fix network config initialization and relogin * apply specific condition for crosswindow at the generic login * add todos * revert minification changes * fix todo * todo fix * changelog update * rebasing on top of development branch * cleanup * upgrade sdk=dapp-utils and cross-window-provider * 0.0.0-alpha.9 --- CHANGELOG.md | 4 +- package.json | 10 +- src/apiCalls/accounts/getAccountFromApi.ts | 7 +- .../methods}/account/getLatestNonce.ts | 0 src/core/methods/init/init.ts | 50 ++++++-- .../methods/login/helpers/getCallbackUrl.ts | 6 + .../helpers/getImpersonatedAccountDetails.ts | 35 ++++++ .../login/helpers/impersonateAccount.ts | 52 ++++++++ .../login/helpers/processModifiedAccount.ts | 52 -------- src/core/methods/login/login.ts | 88 ++++++++++--- src/core/methods/login/webWalletLogin.ts | 118 ------------------ src/core/providers/ProviderFactory.ts | 14 +++ src/core/providers/accountProvider.ts | 3 +- src/core/providers/helpers/emptyProvider.ts | 9 +- .../providers/types/providerFactory.types.ts | 15 ++- src/store/actions/config/configActions.ts | 7 ++ .../actions/loginInfo/loginInfoActions.ts | 23 ++-- .../actions/sharedActions/sharedActions.ts | 7 +- src/store/middleware/applyMiddlewares.ts | 3 +- src/store/middleware/logoutMiddleware.ts | 6 +- src/store/selectors/configSelectors.ts | 6 + src/store/selectors/index.ts | 1 + src/store/selectors/loginInfoSelectors.ts | 3 - src/store/slices/account/account.ts | 110 ---------------- src/store/slices/account/index.ts | 2 +- src/store/slices/config/config.types.ts | 5 + src/store/slices/config/configSlice.ts | 22 ++++ src/store/slices/config/index.ts | 1 + src/store/slices/helpers/getActions.ts | 46 ------- src/store/slices/helpers/getVanillaStore.ts | 59 --------- src/store/slices/helpers/index.ts | 1 - src/store/slices/index.ts | 2 + src/store/slices/loginInfo/index.ts | 2 +- src/store/slices/network/index.ts | 2 +- src/store/slices/shared/listenToLogin.ts | 12 -- src/store/store.ts | 10 +- src/store/store.types.ts | 2 + src/types/login.types.ts | 4 - src/utils/account/getAddress.ts | 6 - src/utils/account/getIsLoggedIn.ts | 5 - src/utils/account/index.ts | 1 - yarn.lock | 36 ++++-- 42 files changed, 354 insertions(+), 493 deletions(-) rename src/{utils => core/methods}/account/getLatestNonce.ts (100%) create mode 100644 src/core/methods/login/helpers/getCallbackUrl.ts create mode 100644 src/core/methods/login/helpers/getImpersonatedAccountDetails.ts create mode 100644 src/core/methods/login/helpers/impersonateAccount.ts delete mode 100644 src/core/methods/login/helpers/processModifiedAccount.ts delete mode 100644 src/core/methods/login/webWalletLogin.ts create mode 100644 src/store/actions/config/configActions.ts create mode 100644 src/store/selectors/configSelectors.ts delete mode 100644 src/store/slices/account/account.ts create mode 100644 src/store/slices/config/config.types.ts create mode 100644 src/store/slices/config/configSlice.ts create mode 100644 src/store/slices/config/index.ts delete mode 100644 src/store/slices/helpers/getActions.ts delete mode 100644 src/store/slices/helpers/getVanillaStore.ts delete mode 100644 src/store/slices/helpers/index.ts delete mode 100644 src/store/slices/shared/listenToLogin.ts delete mode 100644 src/utils/account/getAddress.ts delete mode 100644 src/utils/account/getIsLoggedIn.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index a8281c9..c727b63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - -- [Added sdk-web-wallet-cross-window-provider as peer dependency](https://github.com/multiversx/mx-sdk-dapp-core/pull/12) +- [CrossWindow login](https://github.com/multiversx/mx-sdk-dapp-core/pull/13) +- [Added sdk-web-wallet-cross-window-provider as peer dependency](https://github.com/multiversx/mx-sdk-dapp-core/pull/14) - [Generic login + ExtensionProvider login](https://github.com/multiversx/mx-sdk-dapp-core/pull/12) - [Make middlewares registration more scalable](https://github.com/multiversx/mx-sdk-dapp-core/pull/11) - [Fix Node Polyfills](https://github.com/multiversx/mx-sdk-dapp-core/pull/10) diff --git a/package.json b/package.json index 8fcca57..35afdd1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-dapp-core", - "version": "0.0.0-alpha.7", + "version": "0.0.0-alpha.9", "main": "out/index.js", "module": "out/index.js", "types": "out/index.d.ts", @@ -45,8 +45,8 @@ }, "peerDependencies": { "@multiversx/sdk-core": ">= 13.0.0", - "@multiversx/sdk-dapp-utils": "^0.0.1", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 0.4.2", + "@multiversx/sdk-dapp-utils": ">= 0.1.0", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 1.0.0", "axios": ">=1.6.5", "bignumber.js": "9.x" }, @@ -55,8 +55,8 @@ }, "devDependencies": { "@multiversx/sdk-core": ">= 13.0.0", - "@multiversx/sdk-dapp-utils": "^0.0.1", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 0.4.2", + "@multiversx/sdk-dapp-utils": ">= 0.1.0", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 1.0.0", "@swc/core": "^1.4.17", "@swc/jest": "^0.2.36", "@types/node": "20.12.8", diff --git a/src/apiCalls/accounts/getAccountFromApi.ts b/src/apiCalls/accounts/getAccountFromApi.ts index 1cb8f10..001403f 100644 --- a/src/apiCalls/accounts/getAccountFromApi.ts +++ b/src/apiCalls/accounts/getAccountFromApi.ts @@ -1,12 +1,15 @@ import { ACCOUNTS_ENDPOINT } from 'apiCalls/endpoints'; import { axiosInstance } from 'apiCalls/utils/axiosInstance'; import { getCleanApiAddress } from 'apiCalls/utils/getCleanApiAddress'; +import { AccountType } from 'types/account.types'; export const accountFetcher = (address: string | null) => { const apiAddress = getCleanApiAddress(); const url = `${apiAddress}/${ACCOUNTS_ENDPOINT}/${address}?withGuardianInfo=true`; // we need to get it with an axios instance because of cross-window user interaction issues - return axiosInstance.get(url); + return axiosInstance.get(url, { + baseURL: apiAddress + }); }; export const getAccountFromApi = async (address?: string) => { @@ -16,7 +19,7 @@ export const getAccountFromApi = async (address?: string) => { try { const { data } = await accountFetcher(address); - return data; + return data as AccountType; } catch (err) { console.error('error fetching configuration for ', address); } diff --git a/src/utils/account/getLatestNonce.ts b/src/core/methods/account/getLatestNonce.ts similarity index 100% rename from src/utils/account/getLatestNonce.ts rename to src/core/methods/account/getLatestNonce.ts diff --git a/src/core/methods/init/init.ts b/src/core/methods/init/init.ts index 1e7c369..07d78d0 100644 --- a/src/core/methods/init/init.ts +++ b/src/core/methods/init/init.ts @@ -1,6 +1,9 @@ import { initStore } from 'store/store'; import { defaultStorageCallback, StorageCallback } from 'store/storage'; -import { setTokenLoginNativeAuthTokenConfig } from 'store/actions/loginInfo/loginInfoActions'; +import { setNativeAuthConfig } from 'store/actions/config/configActions'; +import { initializeNetwork } from 'store/actions'; +import { CustomNetworkType } from 'types/network.types'; +import { EnvironmentsEnum } from 'types/enums.types'; import { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types'; import { getDefaultNativeAuthConfig } from 'services/nativeAuth/methods/getDefaultNativeAuthConfig'; @@ -8,23 +11,54 @@ type InitAppType = { storage?: { getStorageCallback: StorageCallback; }; - nativeAuth?: boolean | NativeAuthConfigType; + dAppConfig?: { + nativeAuth?: boolean | NativeAuthConfigType; + network?: CustomNetworkType; + environment?: EnvironmentsEnum; + }; }; const defaultInitAppProps = { storage: { getStorageCallback: defaultStorageCallback } }; -export const initializeDApp = (props?: InitAppType) => { - const { storage, nativeAuth } = { ...defaultInitAppProps, ...props }; + +/** + * Initializes the dApp with the given configuration. + * @param props - The configuration for the dApp initialization. + * @param props.storage - The storage configuration for the dApp. + * @param props.storage.getStorageCallback - The callback to get the storage (custom storage). + * @param props.nativeAuth - The native auth configuration for the dApp. + * @param props.nativeAuth - If set to `true`, will fallback on default configuration. + * @param props.nativeAuth - If set to `false`, will disable native auth. + * @param props.nativeAuth - If set to `NativeAuthConfigType`, will set the native auth configuration. + * + * !!! Avoid changing the configuration during the dApp lifecycle. + * + * @example + * ```ts + * initializeDApp({ + * nativeAuth: true + * }); + * ``` + * */ +export const initializeDApp = async (props?: InitAppType) => { + const { storage, dAppConfig } = { ...defaultInitAppProps, ...props }; initStore(storage.getStorageCallback); - if (nativeAuth) { + if (dAppConfig?.nativeAuth) { const nativeAuthConfig: NativeAuthConfigType = - typeof nativeAuth === 'boolean' + typeof dAppConfig.nativeAuth === 'boolean' ? getDefaultNativeAuthConfig() - : nativeAuth; + : dAppConfig.nativeAuth; + + setNativeAuthConfig(nativeAuthConfig); + } - setTokenLoginNativeAuthTokenConfig(nativeAuthConfig); + if (dAppConfig?.network) { + await initializeNetwork({ + customNetworkConfig: dAppConfig.network, + environment: dAppConfig.environment ?? EnvironmentsEnum.devnet + }); } }; diff --git a/src/core/methods/login/helpers/getCallbackUrl.ts b/src/core/methods/login/helpers/getCallbackUrl.ts new file mode 100644 index 0000000..fb84905 --- /dev/null +++ b/src/core/methods/login/helpers/getCallbackUrl.ts @@ -0,0 +1,6 @@ +import { getWindowLocation } from 'utils/window/getWindowLocation'; + +export function getCallbackUrl() { + const { origin, pathname } = getWindowLocation(); + return encodeURIComponent(`${origin}${pathname}`); +} diff --git a/src/core/methods/login/helpers/getImpersonatedAccountDetails.ts b/src/core/methods/login/helpers/getImpersonatedAccountDetails.ts new file mode 100644 index 0000000..3381c26 --- /dev/null +++ b/src/core/methods/login/helpers/getImpersonatedAccountDetails.ts @@ -0,0 +1,35 @@ +import { getAccount } from 'utils/account/getAccount'; +import { getModifiedLoginToken } from './getModifiedLoginToken'; + +interface GetImpersonatedAccountDetailsType { + address: string; + originalLoginToken?: string; + extraInfoData: { + multisig?: string; + impersonate?: string; + }; +} + +export const getImpersonatedAccountDetails = async ({ + originalLoginToken, + extraInfoData, + address +}: GetImpersonatedAccountDetailsType) => { + const modifiedLoginToken = await getModifiedLoginToken({ + loginToken: originalLoginToken, + extraInfoData + }); + + const tokenAddress = + extraInfoData.multisig || extraInfoData.impersonate || address; + + const accountAddress = modifiedLoginToken != null ? tokenAddress : address; + + const account = await getAccount(accountAddress); + + return { + account, + address: accountAddress, + modifiedLoginToken + }; +}; diff --git a/src/core/methods/login/helpers/impersonateAccount.ts b/src/core/methods/login/helpers/impersonateAccount.ts new file mode 100644 index 0000000..0a3be16 --- /dev/null +++ b/src/core/methods/login/helpers/impersonateAccount.ts @@ -0,0 +1,52 @@ +import { setAccount } from 'store/actions/account'; +import { setLoginToken } from 'store/actions/loginInfo/loginInfoActions'; +import { IProvider } from 'core/providers/types/providerFactory.types'; +import { loginAction } from 'store/actions'; +import { AccountType } from 'types/account.types'; +import { getImpersonatedAccountDetails } from './getImpersonatedAccountDetails'; +import { getLatestNonce } from 'core/methods/account/getLatestNonce'; + +export async function impersonateAccount({ + loginToken, + extraInfoData, + address, + provider +}: { + loginToken: string; + extraInfoData: { + multisig?: string; + impersonate?: string; + }; + address: string; + provider: IProvider; +}) { + const impersonationDetails = await getImpersonatedAccountDetails({ + originalLoginToken: loginToken, + extraInfoData, + address + }); + + if (impersonationDetails.modifiedLoginToken) { + setLoginToken(impersonationDetails.modifiedLoginToken); + } + + if (impersonationDetails.account) { + loginAction({ + address: impersonationDetails.address, + providerType: provider.getType() + }); + + const newAccount: AccountType = { + ...impersonationDetails.account, + nonce: getLatestNonce(impersonationDetails.account) + }; + + setAccount(newAccount); + return { + ...impersonationDetails, + account: newAccount + }; + } + + return impersonationDetails; +} diff --git a/src/core/methods/login/helpers/processModifiedAccount.ts b/src/core/methods/login/helpers/processModifiedAccount.ts deleted file mode 100644 index a433019..0000000 --- a/src/core/methods/login/helpers/processModifiedAccount.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { getAccount } from 'utils/account/getAccount'; -import { - getModifiedLoginToken, - GetMultiSigLoginTokenType -} from './getModifiedLoginToken'; - -interface SetMultisigLoginToken extends GetMultiSigLoginTokenType { - signature?: string; - address: string; - loginService: T; -} - -export const processModifiedAccount = async < - T extends { - setLoginToken: (loginToken: string) => void; - setTokenLoginInfo: ({ - address, - signature - }: { - address: string; - signature: string; - }) => string | undefined; - } ->({ - loginToken: token, - extraInfoData, - address, - signature, - loginService -}: SetMultisigLoginToken) => { - const loginToken = await getModifiedLoginToken({ - loginToken: token, - extraInfoData - }); - - const tokenAddress = - extraInfoData.multisig || extraInfoData.impersonate || address; - - const accountAddress = loginToken != null ? tokenAddress : address; - - if (loginToken != null) { - loginService.setLoginToken(loginToken); - } - - if (signature) { - loginService.setTokenLoginInfo({ signature, address }); - } - - const account = await getAccount(accountAddress); - - return account; -}; diff --git a/src/core/methods/login/login.ts b/src/core/methods/login/login.ts index b3e0ffa..aa17476 100644 --- a/src/core/methods/login/login.ts +++ b/src/core/methods/login/login.ts @@ -1,5 +1,5 @@ import { nativeAuth } from 'services/nativeAuth'; -import { setAddress } from 'store/actions/account'; +import { setAccount, setAddress } from 'store/actions/account'; import { setProviderType, setTokenLogin @@ -13,11 +13,17 @@ import { ProviderFactory } from 'core/providers/ProviderFactory'; import { nativeAuthConfigSelector } from 'store/selectors'; import { getState } from 'store/store'; import { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types'; -import { getIsLoggedIn } from 'utils/account/getIsLoggedIn'; -import { getAddress } from 'utils/account/getAddress'; +import { getIsLoggedIn } from 'core/methods/account/getIsLoggedIn'; +import { getAddress } from 'core/methods/account/getAddress'; +import { loginAction, logoutAction } from 'store/actions'; +import { impersonateAccount } from './helpers/impersonateAccount'; +import { SECOND_LOGIN_ATTEMPT_ERROR } from 'constants/errorMessages.constants'; +import { getCallbackUrl } from './helpers/getCallbackUrl'; async function loginWithoutNativeToken(provider: IProvider) { - await provider.login(); + await provider.login?.({ + callbackUrl: getCallbackUrl() + }); const address = provider.getAddress?.(); @@ -32,6 +38,28 @@ async function loginWithoutNativeToken(provider: IProvider) { }; } +async function tryImpersonateAccount({ + loginToken, + extraInfoData, + address, + provider +}: { + loginToken: string; + extraInfoData: { + multisig?: string; + impersonate?: string; + }; + address: string; + provider: IProvider; +}) { + return await impersonateAccount({ + loginToken, + extraInfoData, + address, + provider + }); +} + async function loginWithNativeToken( provider: IProvider, nativeAuthConfig: NativeAuthConfigType @@ -42,17 +70,27 @@ async function loginWithNativeToken( noCache: true }); - await provider.login({ token: loginToken }); + const loginResult = await provider.login?.({ + callbackUrl: getCallbackUrl(), + token: loginToken + }); - const address = provider.getAddress?.(); - const signature = provider.getTokenLoginSignature?.(); + const address = provider.getAddress + ? // TODO check why on the second login the address is fetched asynchronously (looks like the crosswindow provider has getAddress as an async function) + await provider.getAddress() + : loginResult?.address; + const signature = provider.getTokenLoginSignature + ? provider.getTokenLoginSignature() + : loginResult?.signature; if (!address) { - throw new Error('Address not found'); + console.warn('Login cancelled.'); + return null; } if (!signature) { - throw new Error('Signature not found'); + console.error('Failed to sign login token'); + return null; } const nativeAuthToken = nativeAuthClient.getToken({ @@ -61,19 +99,39 @@ async function loginWithNativeToken( signature }); - setAddress(address); setTokenLogin({ loginToken, signature, - nativeAuthToken, - nativeAuthConfig + nativeAuthToken + }); + loginAction({ + address, + providerType: provider.getType() }); - return { + const impersonationDetails = await tryImpersonateAccount({ + loginToken, + extraInfoData: { + multisig: loginResult?.multisig, + impersonate: loginResult?.impersonate + }, address, + provider + }); + + if (impersonationDetails.account) { + setAccount(impersonationDetails.account); + } else { + logoutAction(); + console.error('Failed to fetch account'); + throw new Error('Failed to fetch account'); + } + + return { + address: impersonationDetails?.address || address, signature, nativeAuthToken, - loginToken, + loginToken: impersonationDetails?.modifiedLoginToken || loginToken, nativeAuthConfig }; } @@ -87,7 +145,7 @@ export const login = async ({ if (loggedIn) { console.warn('Already logged in with:', getAddress()); - return; + throw new Error(SECOND_LOGIN_ATTEMPT_ERROR); } const factory = new ProviderFactory(); diff --git a/src/core/methods/login/webWalletLogin.ts b/src/core/methods/login/webWalletLogin.ts deleted file mode 100644 index 4112087..0000000 --- a/src/core/methods/login/webWalletLogin.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { OnProviderLoginType } from 'types/login.types'; -import { getWindowLocation } from 'utils/window/getWindowLocation'; -import { getLoginService } from './helpers/getLoginService'; -import { networkSelector } from 'store/selectors'; -import { getState } from 'store/store'; -import { getIsLoggedIn } from '../account/getIsLoggedIn'; -import { setAccountProvider } from 'core/providers/accountProvider'; -import { SECOND_LOGIN_ATTEMPT_ERROR } from 'constants/errorMessages.constants'; -import { isBrowserWithPopupConfirmation } from 'constants/browser.constants'; -import { processModifiedAccount } from './helpers/processModifiedAccount'; -import { loginAction } from 'store/actions/sharedActions'; -import { setAccount } from 'store/actions/account/accountActions'; -import { getLatestNonce } from 'utils/account/getLatestNonce'; -import { AccountType } from 'types/account.types'; -import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; -import { ProviderTypeEnum } from '../../providers/types/providerFactory.types'; - -export const webWalletLogin = async ({ - token: tokenToSign, - nativeAuth, - hasConsentPopup, - walletAddress -}: OnProviderLoginType & { - hasConsentPopup?: boolean; - walletAddress?: string; -}): Promise => { - const hasNativeAuth = nativeAuth != null; - const loginService = getLoginService(nativeAuth); - let token = tokenToSign; - const network = networkSelector(getState()); - - const isLoggedIn = getIsLoggedIn(); - - if (isLoggedIn) { - throw new Error(SECOND_LOGIN_ATTEMPT_ERROR); - } - - const isSuccessfullyInitialized: boolean = - await CrossWindowProvider.getInstance().init(); - const provider: CrossWindowProvider = - CrossWindowProvider.getInstance().setWalletUrl( - walletAddress ?? network.walletAddress - ); - - try { - if (!isSuccessfullyInitialized) { - console.warn('Something went wrong trying to redirect to wallet login..'); - return null; - } - - const { origin, pathname } = getWindowLocation(); - const callbackUrl: string = encodeURIComponent(`${origin}${pathname}`); - - if (hasNativeAuth && !token) { - token = await loginService.getNativeAuthLoginToken(); - - // Fetching block failed - if (!token) { - console.warn('Fetching block failed. Login cancelled.'); - return null; - } - } - - if (token) { - loginService.setLoginToken(token); - } - - const providerLoginData = { - callbackUrl, - ...(token && { token }) - }; - - const needsConsent = isBrowserWithPopupConfirmation && hasNativeAuth; - - if (needsConsent || hasConsentPopup) { - provider.setShouldShowConsentPopup(true); - } - - const { signature, address, multisig, impersonate } = - await provider.login(providerLoginData); - - setAccountProvider(provider); - - if (!address) { - console.warn('Login cancelled.'); - return null; - } - - const account = await processModifiedAccount({ - loginToken: token, - extraInfoData: { multisig, impersonate }, - address, - signature, - loginService - }); - - if (!account) { - return null; - } - - loginAction({ - address: account.address, - providerType: ProviderTypeEnum.crossWindow - }); - - const newAccount: AccountType = { - ...account, - nonce: getLatestNonce(account) - }; - - setAccount(newAccount); - - return newAccount; - } catch (error) { - console.error('error logging in', error); - throw error; - } -}; diff --git a/src/core/providers/ProviderFactory.ts b/src/core/providers/ProviderFactory.ts index d11d1c0..a317179 100644 --- a/src/core/providers/ProviderFactory.ts +++ b/src/core/providers/ProviderFactory.ts @@ -6,6 +6,7 @@ import { IProviderFactory, ProviderTypeEnum } from './types/providerFactory.types'; +import { isBrowserWithPopupConfirmation } from '../../constants'; export class ProviderFactory { public async create({ @@ -36,6 +37,10 @@ export class ProviderFactory { return provider.account.signature; }; + createdProvider.getType = () => { + return ProviderTypeEnum.extension; + }; + break; } @@ -47,6 +52,10 @@ export class ProviderFactory { }); createdProvider = provider as unknown as IProvider; + createdProvider.getType = () => { + return ProviderTypeEnum.crossWindow; + }; + break; } @@ -69,6 +78,11 @@ export class ProviderFactory { const provider = CrossWindowProvider.getInstance(); await provider.init(); provider.setWalletUrl(String(walletAddress)); + + if (isBrowserWithPopupConfirmation) { + provider.setShouldShowConsentPopup(true); + } + return provider; } diff --git a/src/core/providers/accountProvider.ts b/src/core/providers/accountProvider.ts index bdce2ab..f1282f3 100644 --- a/src/core/providers/accountProvider.ts +++ b/src/core/providers/accountProvider.ts @@ -1,8 +1,7 @@ import { emptyProvider } from './helpers/emptyProvider'; -import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; import { IProvider } from 'core/providers/types/providerFactory.types'; -export type ProvidersType = IProvider | CrossWindowProvider; +export type ProvidersType = IProvider; let accountProvider: ProvidersType = emptyProvider; diff --git a/src/core/providers/helpers/emptyProvider.ts b/src/core/providers/helpers/emptyProvider.ts index 95d81f6..7503998 100644 --- a/src/core/providers/helpers/emptyProvider.ts +++ b/src/core/providers/helpers/emptyProvider.ts @@ -1,6 +1,9 @@ import { SignableMessage, Transaction } from '@multiversx/sdk-core'; import { EngineTypes } from 'utils/walletconnect/__sdkWalletconnectProvider'; -import { IProvider } from 'core/providers/types/providerFactory.types'; +import { + IProvider, + ProviderTypeEnum +} from 'core/providers/types/providerFactory.types'; export const DAPP_INIT_ROUTE = '/dapp/init'; @@ -101,6 +104,10 @@ export class EmptyProvider implements IProvider { getTokenLoginSignature(): string | undefined { throw new Error(notInitializedError(`getSignature`)); } + + getType(): ProviderTypeEnum { + return ProviderTypeEnum.none; + } } export const emptyProvider = new EmptyProvider(); diff --git a/src/core/providers/types/providerFactory.types.ts b/src/core/providers/types/providerFactory.types.ts index 4bc2ed7..ee6a022 100644 --- a/src/core/providers/types/providerFactory.types.ts +++ b/src/core/providers/types/providerFactory.types.ts @@ -1,17 +1,26 @@ import type { IDAppProviderBase } from '@multiversx/sdk-dapp-utils'; +// @ts-ignore export interface IProvider extends IDAppProviderBase { init: () => Promise; - // TODO change return type to { address: string, signature: string } and also change the return type in IDAppProviderBase. - login: (options?: { token?: string }) => Promise; + login: (options?: { callbackUrl?: string; token?: string }) => Promise<{ + address: string; + signature: string; + multisig?: string; + impersonate?: string; + [key: string]: unknown; + }>; logout: () => Promise; setShouldShowConsentPopup?: (shouldShow: boolean) => void; - getAddress(): string | undefined; + getType: () => ProviderTypeEnum; + getAddress(): Promise; // TODO will be removed as soon as the new login method is implemented in the same way for all providers getTokenLoginSignature(): string | undefined; + // getExtraInfoData(): { multisig?: string; impersonate?: string } | undefined; } export interface IProviderConfig { + // TODO check if we have to pass the network object as argument here or it should be read from the state network: { walletAddress: string; }; diff --git a/src/store/actions/config/configActions.ts b/src/store/actions/config/configActions.ts new file mode 100644 index 0000000..ef3c122 --- /dev/null +++ b/src/store/actions/config/configActions.ts @@ -0,0 +1,7 @@ +import { getStore } from 'store/store'; +import { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types'; + +export const setNativeAuthConfig = (config: NativeAuthConfigType) => + getStore().setState(({ config: state }) => { + state.nativeAuthConfig = config; + }); diff --git a/src/store/actions/loginInfo/loginInfoActions.ts b/src/store/actions/loginInfo/loginInfoActions.ts index 887a670..68d6d6b 100644 --- a/src/store/actions/loginInfo/loginInfoActions.ts +++ b/src/store/actions/loginInfo/loginInfoActions.ts @@ -6,7 +6,6 @@ import { } from 'store/slices/loginInfo/loginInfo.types'; import { getStore } from 'store/store'; import { ProviderTypeEnum } from 'core/providers/types/providerFactory.types'; -import { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types'; export const setProviderType = (providerType: ProviderTypeEnum) => getStore().setState(({ loginInfo: state }) => { @@ -18,26 +17,22 @@ export const setTokenLogin = (tokenLogin: TokenLoginType) => state.tokenLogin = tokenLogin; }); -export const setTokenLoginSignature = (signature: string) => +export const setLoginToken = (loginToken: string) => getStore().setState(({ loginInfo: state }) => { - if (state?.tokenLogin != null) { - state.tokenLogin.signature = signature; + if (state.tokenLogin != null) { + state.tokenLogin.loginToken = loginToken; + return; } + state.tokenLogin = { + loginToken + }; }); -export const setTokenLoginNativeAuthTokenConfig = ( - nativeAuthConfig: NativeAuthConfigType -) => +export const setTokenLoginSignature = (signature: string) => getStore().setState(({ loginInfo: state }) => { if (state?.tokenLogin != null) { - state.tokenLogin.nativeAuthConfig = nativeAuthConfig; - return; + state.tokenLogin.signature = signature; } - - state.tokenLogin = { - nativeAuthConfig, - loginToken: '' - }; }); export const setWalletLogin = (walletLogin: LoginInfoType | null) => diff --git a/src/store/actions/sharedActions/sharedActions.ts b/src/store/actions/sharedActions/sharedActions.ts index e03b1af..91b89b1 100644 --- a/src/store/actions/sharedActions/sharedActions.ts +++ b/src/store/actions/sharedActions/sharedActions.ts @@ -14,7 +14,12 @@ export const loginAction = ({ providerType }: LoginActionPayloadType) => getStore().setState(({ account, loginInfo }) => { + console.log('settings address with:', address); + account.address = address; account.publicKey = new Address(address).hex(); - loginInfo.providerType = providerType; + + if (loginInfo) { + loginInfo.providerType = providerType; + } }); diff --git a/src/store/middleware/applyMiddlewares.ts b/src/store/middleware/applyMiddlewares.ts index e141f6e..5d4dd7f 100644 --- a/src/store/middleware/applyMiddlewares.ts +++ b/src/store/middleware/applyMiddlewares.ts @@ -1,8 +1,7 @@ import { StoreType } from '../store.types'; -import { StoreApi } from 'zustand/vanilla'; import { logoutMiddleware } from './logoutMiddleware'; export const applyMiddlewares = (state: StoreType, _prevState: StoreType) => { logoutMiddleware(state); // TODO add more middlewares here and eventually use _prevState if applicable -}; \ No newline at end of file +}; diff --git a/src/store/middleware/logoutMiddleware.ts b/src/store/middleware/logoutMiddleware.ts index 303703c..b4fe50a 100644 --- a/src/store/middleware/logoutMiddleware.ts +++ b/src/store/middleware/logoutMiddleware.ts @@ -23,8 +23,8 @@ export function setLoginExpiresAt(expiresAt: number) { }); } -export const logoutMiddleware = (newStore: StoreType) => { - const isLoggedIn = isLoggedInSelector(newStore); +export const logoutMiddleware = (state: StoreType) => { + const isLoggedIn = isLoggedInSelector(state); const loginTimestamp = storage.local.getItem(localStorageKeys.loginExpiresAt); if (!isLoggedIn) { @@ -41,6 +41,6 @@ export const logoutMiddleware = (newStore: StoreType) => { if (isExpired) { // logout - resetStore(newStore); + resetStore(state); } }; diff --git a/src/store/selectors/configSelectors.ts b/src/store/selectors/configSelectors.ts new file mode 100644 index 0000000..d4e507d --- /dev/null +++ b/src/store/selectors/configSelectors.ts @@ -0,0 +1,6 @@ +import { StoreType } from 'store/store.types'; + +export const configSelector = ({ config }: StoreType) => config; + +export const nativeAuthConfigSelector = ({ config }: StoreType) => + config.nativeAuthConfig; diff --git a/src/store/selectors/index.ts b/src/store/selectors/index.ts index 5043925..0d00fab 100644 --- a/src/store/selectors/index.ts +++ b/src/store/selectors/index.ts @@ -2,3 +2,4 @@ export * from './accountSelectors'; export * from './networkSelectors'; export * from './storeSelector'; export * from './loginInfoSelectors'; +export * from './configSelectors'; diff --git a/src/store/selectors/loginInfoSelectors.ts b/src/store/selectors/loginInfoSelectors.ts index 4453da2..f8251c9 100644 --- a/src/store/selectors/loginInfoSelectors.ts +++ b/src/store/selectors/loginInfoSelectors.ts @@ -4,6 +4,3 @@ export const loginInfoSelector = ({ loginInfo }: StoreType) => loginInfo; export const tokenLoginSelector = ({ loginInfo }: StoreType) => loginInfo.tokenLogin; - -export const nativeAuthConfigSelector = ({ loginInfo }: StoreType) => - loginInfo.tokenLogin?.nativeAuthConfig; diff --git a/src/store/slices/account/account.ts b/src/store/slices/account/account.ts deleted file mode 100644 index 4e96d71..0000000 --- a/src/store/slices/account/account.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { AccountType } from 'types/account.types'; -import { getActions } from '../helpers'; -import { getVanillaStore } from '../helpers/getVanillaStore'; -import { getReactStore } from './../helpers/getReactStore'; -import { GetSetType } from './../helpers/types'; -import { listenToLogout } from './../shared/listenToLogout'; -import { - AccountSliceType, - BatchTransactionsWSResponseType, - LedgerAccountType -} from './account.types'; -import { emptyAccount } from './emptyAccount'; -import { listenToLogin } from '../shared/listenToLogin'; -import { Address } from '@multiversx/sdk-core/out'; - -const initialData: AccountSliceType = { - address: '', - websocketEvent: null, - websocketBatchEvent: null, - accounts: { '': emptyAccount }, - ledgerAccount: null, - publicKey: '', - walletConnectAccount: null -}; - -const actions = { - setAddress: (_address: string) => {}, - setAccount: (_account: AccountType) => {}, - setLedgerAccount: (_ledgerAccount: LedgerAccountType | null) => {}, - updateLedgerAccount: (_ledgerAccount: { - index: LedgerAccountType['index']; - address: LedgerAccountType['address']; - }) => {}, - setWalletConnectAccount: (_walletConnectAccount: string | null) => {}, - setWebsocketEvent: (_message: string) => {}, - setWebsocketBatchEvent: (_data: BatchTransactionsWSResponseType) => {} -}; - -const initialState = { - ...initialData, - ...actions -}; - -type StateType = typeof initialState; - -const definition = (set: GetSetType): StateType => { - const createActions = getActions({ set, actions }); - - return { - ...initialData, - ...createActions({ - setAddress: (state, address) => { - state.address = address; - }, - setAccount: (state, account) => { - const isSameAddress = state.address === account.address; - state.accounts = { - [state.address]: isSameAddress ? account : emptyAccount - }; - }, - setLedgerAccount: (state, ledgerAccount) => { - state.ledgerAccount = ledgerAccount; - }, - updateLedgerAccount: (state, { index, address }) => { - if (state.ledgerAccount) { - state.ledgerAccount.address = address; - state.ledgerAccount.index = index; - } - }, - setWalletConnectAccount: (state, walletConnectAccount) => { - state.walletConnectAccount = walletConnectAccount; - }, - setWebsocketEvent: (state, message) => { - state.websocketEvent = { - timestamp: Date.now(), - message - }; - }, - setWebsocketBatchEvent: (state, data) => { - state.websocketBatchEvent = { - timestamp: Date.now(), - data - }; - } - }) - }; -}; - -const handleLogout = listenToLogout((state: StateType) => { - state.setAddress(''); -}); - -const handleLogin = listenToLogin( - (state: StateType, { detail: { address } }) => { - state.address = address; - state.publicKey = new Address(address).hex(); - } -); - -export const accountStore = getVanillaStore({ - name: 'accountStore', - definition, - middleware: [handleLogout, handleLogin] -}); - -// react store -export const useAccountStore = getReactStore({ - initialState, - store: accountStore -}); diff --git a/src/store/slices/account/index.ts b/src/store/slices/account/index.ts index 96e1a81..754ef64 100644 --- a/src/store/slices/account/index.ts +++ b/src/store/slices/account/index.ts @@ -1 +1 @@ -export * from './accountSlice'; +export { accountSlice } from './accountSlice'; diff --git a/src/store/slices/config/config.types.ts b/src/store/slices/config/config.types.ts new file mode 100644 index 0000000..52b3270 --- /dev/null +++ b/src/store/slices/config/config.types.ts @@ -0,0 +1,5 @@ +import { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types'; + +export interface ConfigSliceType { + nativeAuthConfig: NativeAuthConfigType | null; +} diff --git a/src/store/slices/config/configSlice.ts b/src/store/slices/config/configSlice.ts new file mode 100644 index 0000000..3c4500d --- /dev/null +++ b/src/store/slices/config/configSlice.ts @@ -0,0 +1,22 @@ +import { StateCreator } from 'zustand/vanilla'; +import { StoreType, MutatorsIn } from 'store/store.types'; +import { ConfigSliceType } from './config.types'; + +// Do not export initial state for the config slice. +// This will be permanently defined by the dApp at dApp initialization. +// The config should be changed by using the `setNativeAuthConfig` action in some specific cases. +// Preferably, the config should be set at the dApp initialization and not changed during the dApp lifecycle. (e.g. when the user logs in/log out) +const initialState: ConfigSliceType = { + nativeAuthConfig: null +}; + +function getConfigSlice(): StateCreator< + StoreType, + MutatorsIn, + [], + ConfigSliceType +> { + return () => initialState; +} + +export const configSlice = getConfigSlice(); diff --git a/src/store/slices/config/index.ts b/src/store/slices/config/index.ts new file mode 100644 index 0000000..94cbeb5 --- /dev/null +++ b/src/store/slices/config/index.ts @@ -0,0 +1 @@ +export { configSlice } from './configSlice'; diff --git a/src/store/slices/helpers/getActions.ts b/src/store/slices/helpers/getActions.ts deleted file mode 100644 index 17e45be..0000000 --- a/src/store/slices/helpers/getActions.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { getKeys } from './getKeys'; -import { GetSetType } from './types'; - -// Define a function getActions that takes a set function and a set of actions, and returns a function to create wrapped actions -export const getActions = any>>({ - set, - actions, - shouldReplace = false -}: { - set: GetSetType; - actions: A; - shouldReplace?: boolean; -}) => { - type ActionType = typeof actions; - - // Define the return type for the wrapped actions - type CreateSetterReturnType = { - [P in K]: (...args: Parameters) => void; - }; - - const keys = getKeys(actions); // Generate a mapping of action names to keys using the getKeys helper function - - // Define a wrapper function that takes an object with action implementations and returns wrapped actions - const actionsCreator = (actionObj: { - [P in K]: (state: T, ...args: Parameters) => void; - }): CreateSetterReturnType => { - // Initialize the result object to store the wrapped actions - const result = {} as CreateSetterReturnType; - - // Iterate over each action in the provided action object - for (const name in actionObj) { - const func = actionObj[name]; // Get the action implementation function - - // Create a wrapped function for each action that sets the state and dispatches an action type - result[name] = (...args: Parameters) => - set((state) => func(state, ...args), shouldReplace, { - type: keys[name] - }); - } - - return result; - }; - - // Return the wrapper function from getActions - return actionsCreator; -}; diff --git a/src/store/slices/helpers/getVanillaStore.ts b/src/store/slices/helpers/getVanillaStore.ts deleted file mode 100644 index 83f95cf..0000000 --- a/src/store/slices/helpers/getVanillaStore.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { storage } from 'constants/storage'; -import { StoreApi, createStore } from 'zustand'; -import { devtools, persist } from 'zustand/middleware'; -import { immer } from 'zustand/middleware/immer'; -import { GetSetType } from './../helpers/types'; - -const getStore = ({ - definitionFunc, - name -}: { - definitionFunc: (...a: Parameters>) => T; - name: string; -}) => - createStore()( - devtools( - persist( - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore:next-line - immer((...a) => definitionFunc(...a)), - { - name, - storage - } - ) - ) - ); - -type GetDefinitionType = { - definition: (set: GetSetType) => T; - middleware?: Array<(...args: any) => any>; -}; - -// Definition function combining definition and handleLogout -const getDefinition = - ({ definition, middleware = [] }: GetDefinitionType) => - (...a: Parameters>) => { - const appliedMiddleware = middleware.reduce((acc, current) => { - acc = { - ...acc, - ...current(...a) - }; - return acc; - }, {}); - - return { - ...definition(...(a as Parameters)), - ...appliedMiddleware - }; - }; - -export const getVanillaStore = ({ - name, - definition, - middleware = [] -}: GetDefinitionType & { name: string }) => - getStore({ - definitionFunc: getDefinition({ definition, middleware }), - name - }); diff --git a/src/store/slices/helpers/index.ts b/src/store/slices/helpers/index.ts deleted file mode 100644 index 26337ae..0000000 --- a/src/store/slices/helpers/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './getActions'; diff --git a/src/store/slices/index.ts b/src/store/slices/index.ts index 5451f0f..80d5a64 100644 --- a/src/store/slices/index.ts +++ b/src/store/slices/index.ts @@ -1,2 +1,4 @@ export * from './account'; export * from './network'; +export * from './loginInfo'; +export * from './config'; diff --git a/src/store/slices/loginInfo/index.ts b/src/store/slices/loginInfo/index.ts index 33acda8..45c466b 100644 --- a/src/store/slices/loginInfo/index.ts +++ b/src/store/slices/loginInfo/index.ts @@ -1 +1 @@ -export * from './loginInfoSlice'; +export { loginInfoSlice } from './loginInfoSlice'; diff --git a/src/store/slices/network/index.ts b/src/store/slices/network/index.ts index 2dbcb1d..47a3c69 100644 --- a/src/store/slices/network/index.ts +++ b/src/store/slices/network/index.ts @@ -1 +1 @@ -export * from './networkSlice'; +export { networkSlice } from './networkSlice'; diff --git a/src/store/slices/shared/listenToLogin.ts b/src/store/slices/shared/listenToLogin.ts deleted file mode 100644 index 067c8a0..0000000 --- a/src/store/slices/shared/listenToLogin.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { SharedActionsEnum } from 'store/actions/constants'; -import { getListenToEvent } from 'store/helpers/eventHandlers'; -import { LoginMethodsEnum } from 'types/enums.types'; - -export interface LoginActionPayloadType { - address: string; - loginMethod: LoginMethodsEnum; -} - -export const listenToLogin = getListenToEvent( - SharedActionsEnum.LOGIN -); diff --git a/src/store/store.ts b/src/store/store.ts index 917579e..32d2e3a 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -6,12 +6,11 @@ import { defaultStorageCallback, StorageCallback } from './storage'; -import { networkSlice } from './slices/network/networkSlice'; -import { accountSlice } from './slices/account/accountSlice'; +import { networkSlice, accountSlice, loginInfoSlice } from './slices'; import { createBoundedUseStore } from './createBoundedStore'; -import { loginInfoSlice } from './slices/loginInfo'; import { StoreType } from './store.types'; -import { applyMiddlewares } from './middleware/applyMiddlewares'; +import { applyMiddlewares } from './middleware'; +import { configSlice } from './slices'; export type MutatorsIn = [ ['zustand/devtools', never], @@ -32,7 +31,8 @@ export const createDAppStore = (getStorageCallback: StorageCallback) => { immer((...args) => ({ network: networkSlice(...args), account: accountSlice(...args), - loginInfo: loginInfoSlice(...args) + loginInfo: loginInfoSlice(...args), + config: configSlice(...args) })), { name: 'sdk-dapp-store', diff --git a/src/store/store.types.ts b/src/store/store.types.ts index 8fa32da..8145523 100644 --- a/src/store/store.types.ts +++ b/src/store/store.types.ts @@ -1,11 +1,13 @@ import { AccountSliceType } from './slices/account/account.types'; import { LoginInfoSliceType } from './slices/loginInfo/loginInfo.types'; import { NetworkSliceType } from './slices/network/networkSlice.types'; +import { ConfigSliceType } from './slices/config/config.types'; export type StoreType = { network: NetworkSliceType; account: AccountSliceType; loginInfo: LoginInfoSliceType; + config: ConfigSliceType; }; export type MutatorsIn = [ diff --git a/src/types/login.types.ts b/src/types/login.types.ts index 4a5f053..a7b9a5c 100644 --- a/src/types/login.types.ts +++ b/src/types/login.types.ts @@ -12,8 +12,4 @@ export interface TokenLoginType { loginToken: string; signature?: string; nativeAuthToken?: string; - /** - * config to be restored when web wallet provider returns url signature - */ - nativeAuthConfig?: NativeAuthConfigType; } diff --git a/src/utils/account/getAddress.ts b/src/utils/account/getAddress.ts deleted file mode 100644 index c65e0a5..0000000 --- a/src/utils/account/getAddress.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { addressSelector } from 'store/selectors'; -import { getState } from 'store/store'; - -export const getAddress = () => { - return addressSelector(getState()); -}; diff --git a/src/utils/account/getIsLoggedIn.ts b/src/utils/account/getIsLoggedIn.ts deleted file mode 100644 index 722dd1c..0000000 --- a/src/utils/account/getIsLoggedIn.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { getAddress } from './getAddress'; - -export const getIsLoggedIn = () => { - return Boolean(getAddress()); -}; diff --git a/src/utils/account/index.ts b/src/utils/account/index.ts index e8c98d1..7603022 100644 --- a/src/utils/account/index.ts +++ b/src/utils/account/index.ts @@ -1,2 +1 @@ export * from './getAccount'; -export * from './getLatestNonce'; diff --git a/yarn.lock b/yarn.lock index 9eef0d1..2b70c98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -996,10 +996,10 @@ json-bigint "1.0.0" keccak "3.0.2" -"@multiversx/sdk-dapp-utils@^0.0.1": - version "0.0.1" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-dapp-utils/-/sdk-dapp-utils-0.0.1.tgz#ba8bd9319649d45dea9a76beca1e03d957dea2cb" - integrity sha512-fl3TdES93Jc4T559BI+QxNRGRUTabb7TiAXHKL9g6mbLD+silK+5euAoDpPBkbZpVFnfsXQssUVuyKBV4Ine6w== +"@multiversx/sdk-dapp-utils@>= 0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-dapp-utils/-/sdk-dapp-utils-0.1.0.tgz#3103c2ffc648703e75f96acd229af299cb0840ab" + integrity sha512-EFvktZ/S1WQ1ie02nnKZHARC4r23JZWwoTFd5py1qi/Z/UoLHIzJ394HLjXFb6gBTsp4wnvNwIXBA/DNrd2Yeg== "@multiversx/sdk-extension-provider@3.0.0": version "3.0.0" @@ -1056,10 +1056,10 @@ "@walletconnect/utils" "2.12.2" bech32 "1.1.4" -"@multiversx/sdk-web-wallet-cross-window-provider@>= 0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-0.4.2.tgz#49f6d7f526bd3ed16bb7c9eb85b084d710f2168f" - integrity sha512-0J99FYrMyQ9wzjGJKGc6nim2s4tZGMsmEClU/5lZDkTwgbfJd2LdMX2bm4yMYmBE8uUp/qOIHQOXFMZCW7VDFQ== +"@multiversx/sdk-web-wallet-cross-window-provider@>= 1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-1.0.0.tgz#14ea0eb110de78a7e5dfbb1cb237cc8f86006b40" + integrity sha512-xqdKCFpBCxNcp4aSwC2FLbks2Ii2uy5YpHnqR8qnqCnjH6TqdGZ1xKzQauZsiYqseVueVTmynK28w9pTOZ0Oqg== dependencies: "@types/jest" "^29.5.11" "@types/qs" "6.9.10" @@ -6426,7 +6426,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -6440,6 +6440,13 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -6998,7 +7005,7 @@ word-wrap@^1.2.5: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -7016,6 +7023,15 @@ wrap-ansi@^6.0.1: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 736cbbfe43cc53006db6c4bb62b1366a2b333156 Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Thu, 29 Aug 2024 18:42:57 +0300 Subject: [PATCH 15/17] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c727b63..72cdbe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [[0.0.0-alpha.9]](https://github.com/multiversx/mx-sdk-dapp-core)] - 2024-08-29 - [CrossWindow login](https://github.com/multiversx/mx-sdk-dapp-core/pull/13) - [Added sdk-web-wallet-cross-window-provider as peer dependency](https://github.com/multiversx/mx-sdk-dapp-core/pull/14) - [Generic login + ExtensionProvider login](https://github.com/multiversx/mx-sdk-dapp-core/pull/12) From df0f20b05d348d183b5799f87d05d9067a46029c Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Thu, 29 Aug 2024 18:48:53 +0300 Subject: [PATCH 16/17] fix merge conflicts --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72cdbe5..2914113 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [[0.0.0-alpha.9]](https://github.com/multiversx/mx-sdk-dapp-core)] - 2024-08-29 - [CrossWindow login](https://github.com/multiversx/mx-sdk-dapp-core/pull/13) +## [[v0.0.0-alpha.8]](https://github.com/multiversx/mx-sdk-dapp-core/pull/16) - 2024-08-27 - [Added sdk-web-wallet-cross-window-provider as peer dependency](https://github.com/multiversx/mx-sdk-dapp-core/pull/14) - [Generic login + ExtensionProvider login](https://github.com/multiversx/mx-sdk-dapp-core/pull/12) - [Make middlewares registration more scalable](https://github.com/multiversx/mx-sdk-dapp-core/pull/11) From 9a9f281d5ce2736edf440ed71419e21006e5fa1d Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Thu, 29 Aug 2024 18:51:18 +0300 Subject: [PATCH 17/17] fix build --- src/core/methods/login/login.ts | 2 +- src/core/providers/ProviderFactory.ts | 2 +- src/core/providers/helpers/emptyProvider.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/methods/login/login.ts b/src/core/methods/login/login.ts index aa17476..fb064f0 100644 --- a/src/core/methods/login/login.ts +++ b/src/core/methods/login/login.ts @@ -25,7 +25,7 @@ async function loginWithoutNativeToken(provider: IProvider) { callbackUrl: getCallbackUrl() }); - const address = provider.getAddress?.(); + const address = await provider.getAddress?.(); if (!address) { throw new Error('Address not found'); diff --git a/src/core/providers/ProviderFactory.ts b/src/core/providers/ProviderFactory.ts index a317179..620b6ae 100644 --- a/src/core/providers/ProviderFactory.ts +++ b/src/core/providers/ProviderFactory.ts @@ -30,7 +30,7 @@ export class ProviderFactory { createdProvider = provider as unknown as IProvider; createdProvider.getAddress = () => { - return provider.account.address; + return Promise.resolve(provider.account.address); }; createdProvider.getTokenLoginSignature = () => { diff --git a/src/core/providers/helpers/emptyProvider.ts b/src/core/providers/helpers/emptyProvider.ts index 7503998..b73c157 100644 --- a/src/core/providers/helpers/emptyProvider.ts +++ b/src/core/providers/helpers/emptyProvider.ts @@ -97,7 +97,7 @@ export class EmptyProvider implements IProvider { ); } - getAddress(): string | undefined { + async getAddress(): Promise { throw new Error(notInitializedError('getAddress')); }