import { A as Account, L as LocalStorageApi, C as ChainApi, a as CloudStorageApi, b as App } from '../types-CztPAgZT.js'; export * from '@parity/product-sdk-local-storage/testing'; export * from '@parity/product-sdk-signer/testing'; export * from '@parity/product-sdk-contracts/testing'; export * from '@parity/product-sdk-host/testing'; import '@parity/product-sdk-logger'; import '@parity/product-sdk-cloud-storage'; import '@parity/result'; import '@parity/product-sdk-chain-client'; import '../dotns-hLSvmo6u.js'; import 'polkadot-api'; /** Configurable behavior for the fake {@link WalletApi}. */ interface FakeWalletOptions { /** Accounts `connect()` / `getAccounts()` expose. Default: none. */ accounts?: Account[]; /** Initially selected account. Default: the first account, or `null`. */ selected?: Account | null; /** Bytes returned by `signMessage` / `createProof`. Default: 64 zero bytes. */ signature?: Uint8Array; /** Value returned by `getProductAccount()`. Default: the selected account. */ productAccount?: Account | null; /** Value returned by `getAnonymousAlias()`. Default: `null`. */ anonymousAlias?: string | null; } /** Options for {@link createFakeApp}. */ interface CreateFakeAppOptions { /** App name reported by `getAppInfo()`. Default: `"fake-app"`. */ name?: string; /** Configure the fake wallet. */ wallet?: FakeWalletOptions; /** Override the local-storage API. Default: in-memory (backed by `createFakeHostLocalStorage`). */ localStorage?: LocalStorageApi; /** Override the chain API. Default: unconfigured (throws until you provide one). */ chain?: ChainApi; /** Override cloud storage, or pass `null` to disable it. Default: an in-memory fake. */ cloudStorage?: CloudStorageApi | null; } /** * Create a fake {@link App}. Wallet, local-storage, and cloud-storage are working * in-memory fakes; `chain` is unconfigured until you override it. Every sub-API * is overridable. * * @example * ```ts * import { createFakeApp } from "@parity/product-sdk/testing"; * * const app = createFakeApp({ wallet: { accounts: [alice, bob], selected: alice } }); * await app.wallet.connect(); * expect(app.wallet.getAccounts()).toHaveLength(2); * ``` * * For React, feed the fake to the exported context: * ```tsx * import { ProductSDKContext } from "@parity/product-sdk/react"; * render(); * ``` */ declare function createFakeApp(options?: CreateFakeAppOptions): App; export { type CreateFakeAppOptions, type FakeWalletOptions, createFakeApp };