import { a as SignerAccount, P as ProviderType, S as SignerProvider, C as ConnectionStatus, b as SignerError } from './errors-C_RqDLqL.js'; import '@parity/product-sdk-errors'; import '@parity/result'; import 'polkadot-api'; import '@parity/product-sdk-address'; import '@parity/product-sdk-host'; /** * Build a {@link SignerAccount} with test defaults. Override any field. * * The stub `getSigner()` signs a fixed 64 zero bytes — enough to exercise call * sites, not a real signature. Override `getSigner` if a test needs real ones. */ declare function fakeSignerAccount(overrides?: Partial): SignerAccount; /** A controllable {@link SignerProvider} with an inspection surface for tests. */ interface FakeSignerProvider extends SignerProvider { /** Push a connection-status change to `onStatusChange` subscribers. */ emitStatus(status: ConnectionStatus): void; /** Replace the account list and notify `onAccountsChange` subscribers. */ emitAccounts(accounts: SignerAccount[]): void; /** Make the next `connect()` resolve to `err(error)`. */ failConnect(error: SignerError): void; /** Lifecycle calls (`connect` / `disconnect`) against this provider, in order. */ readonly calls: ReadonlyArray<{ method: string; }>; /** Reset accounts, pending error, subscribers, and the call log. */ reset(): void; } /** Options for {@link createFakeSignerProvider}. */ interface CreateFakeSignerProviderOptions { /** Accounts `connect()` resolves with. Default: a single dev account. */ accounts?: SignerAccount[]; /** Provider type. Default `"dev"`; use `"host"` to exercise host-only paths. */ type?: ProviderType; } /** * Create a controllable in-memory {@link SignerProvider}. * * @example * ```ts * import { SignerManager } from "@parity/product-sdk-signer"; * import { createFakeSignerProvider } from "@parity/product-sdk-signer/testing"; * * const provider = createFakeSignerProvider(); * const manager = new SignerManager({ createProvider: () => provider, persistence: null }); * await manager.connect("dev"); * provider.emitStatus("disconnected"); // drive the reconnection path * ``` */ declare function createFakeSignerProvider(options?: CreateFakeSignerProviderOptions): FakeSignerProvider; export { type CreateFakeSignerProviderOptions, type FakeSignerProvider, createFakeSignerProvider, fakeSignerAccount };