{
  "version": 3,
  "sources": ["../../../src/methods/initApp/initApp.types.ts"],
  "sourcesContent": ["import { WalletConnectConfig } from 'providers/strategies/WalletConnectProviderStrategy/types/walletConnect.types';\nimport { ICustomProvider } from 'providers/types/providerFactory.types';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { IProviderSettings } from 'store/slices/config/config.types';\nimport { StorageCallback } from 'store/storage';\nimport { EnvironmentsEnum } from 'types/enums.types';\nimport { CustomNetworkType } from 'types/network.types';\nimport { ThemesEnum } from 'types/theme.types';\n\ntype BaseDappConfigType = {\n  /**\n   * The native auth configuration for the dApp.\n   * If set to `true`, will fallback on default configuration.\n   * If set to `false`, will disable native auth.\n   * If set to `NativeAuthConfigType`, will set the native auth configuration.\n   */\n  nativeAuth?: boolean | NativeAuthConfigType;\n  /**\n   * Customize existing providers\n   */\n  providers?: {\n    walletConnect?: WalletConnectConfig;\n    settings?: IProviderSettings;\n  };\n  /**\n   * Customize the dApp theme.\n   * @example\n   * ```ts\n   * import { ThemesEnum } from '@multiversx/sdk-dapp/out/types/theme.types';\n   *\n   *   theme: ThemesEnum.dark\n   * ```\n   */\n  theme?: `${ThemesEnum}`;\n};\n\nexport type TransactionTrackingConfigType = {\n  successfulToastLifetime?: number;\n  /**\n   * The callback to run when the transaction session is successful.\n   */\n  onSuccess?: (sessionId: string) => Promise<void>;\n  /**\n   * The callback to run when the transaction session fails.\n   */\n  onFail?: (sessionId: string) => Promise<void>;\n};\n\nexport type EnvironmentDappConfigType = BaseDappConfigType & {\n  /**\n   * If passed in, will automatically initialize the network with the given environment and skip fetching `/dapp/config` data from server.\n   */\n  environment: EnvironmentsEnum;\n  network?: CustomNetworkType;\n  transactionTracking?: TransactionTrackingConfigType;\n};\n\nexport type CustomNetworkDappConfigType = BaseDappConfigType & {\n  /**\n   * Can override the network configuration, e.g. for sovereign shards.\n   * Must include `apiAddress` if provided.\n   */\n  network: CustomNetworkType & { apiAddress: string };\n  environment?: never;\n  transactionTracking?: TransactionTrackingConfigType;\n};\n\nexport type DappConfigType =\n  | EnvironmentDappConfigType\n  | CustomNetworkDappConfigType;\n\nexport type InitAppType = {\n  /**\n   * The storage configuration for the dApp.\n   * @example\n   * ```ts\n   * {\n   *   getStorageCallback: () => window.localStorage\n   * }\n   * ```\n   */\n  storage?: {\n    /**\n     * The callback to get the storage (custom storage).\n     */\n    getStorageCallback: StorageCallback;\n  };\n  /**\n   * The dApp configuration.\n   * @example\n   * ```ts\n   * {\n      nativeAuth: true,\n      environment: EnvironmentsEnum.devnet,\n      theme: ThemesEnum.light,\n      network: {\n        walletAddress: 'https://wallet.multiversx.com'\n        // ...other network properties to override\n      },\n      providers: {\n        walletConnect: {\n          walletConnectV2ProjectId\n        }\n      },\n      transactionTracking: {\n        successfulToastLifetime: DEFAULT_TOAST_LIEFTIME,\n        onSuccess: async (sessionId) => {\n          console.log('Transactions execution successful', sessionId);\n        },\n        onFail: async (sessionId) => {\n          console.log('Transactions execution failed', sessionId);\n        }\n      }\n    }\n   * ```\n   */\n  dAppConfig: DappConfigType;\n  /**\n   * If you want to extend the default providers, you can pass in a list of custom providers.\n   * @example\n   * ```ts\n   * [{\n        name: 'Custom Provider',\n        type: 'custom',\n        iconUrl: `${window.location.origin}/multiversx-white.svg`,\n        constructor: async (options) => new CustomProvider(options)\n    * }]\n   * ```\n   */\n  customProviders?: ICustomProvider[];\n};\n"],
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
  "names": ["initApp_types_exports", "__toCommonJS"]
}
