import { type LoggerConfig } from "../../core"; import type { ByokChainAdapterFactory, ByokKeyringCreateOpts } from "./ByokKeyring"; import { ByokKeyring } from "./ByokKeyring"; import type { ServerChainAdapterFactory, ServerKeyringCreateOpts, ServerWalletInfo } from "./ServerKeyring"; import { ServerKeyring } from "./ServerKeyring"; import type { ByokWalletInfo, MnemonicKeyringInput } from "./types"; export declare const KEYRING_KIND: { readonly BYOK: "byok"; readonly SERVER: "server"; }; export type KeyringKind = (typeof KEYRING_KIND)[keyof typeof KEYRING_KIND]; export type ByokKeyringInput = MnemonicKeyringInput; export type ServerKeyringInput = Omit; export type KeyringSpec = (LoggerConfig & { mode: typeof KEYRING_KIND.BYOK; input: MnemonicKeyringInput; adapters: ByokChainAdapterFactory[]; defaultNamespace?: ByokKeyringCreateOpts["defaultNamespace"]; registration: ByokKeyringCreateOpts["registration"]; }) | (LoggerConfig & { mode: typeof KEYRING_KIND.SERVER; input: ServerKeyringInput; adapters: ServerChainAdapterFactory[]; }); /** * Construct a keyring for a single mode. The caller passes one adapter * factory per namespace they want to support — `EvmByokAdapter`, * `SolanaByokAdapter`, etc. for BYOK mode; their server counterparts for * server mode. * * Wallet clients consume the returned keyring and reach chain-typed methods * via `keyring.getAdapter(namespace)`. The keyring is reusable across every * chain wallet client the consumer constructs from the same mnemonic / project. */ export declare function createKeyringController(spec: { mode: typeof KEYRING_KIND.BYOK; input: MnemonicKeyringInput; adapters: ByokChainAdapterFactory[]; defaultNamespace?: ByokKeyringCreateOpts["defaultNamespace"]; registration: ByokKeyringCreateOpts["registration"]; } & LoggerConfig): Promise<{ keyring: ByokKeyring; wallets: ByokWalletInfo[]; }>; export declare function createKeyringController(spec: { mode: typeof KEYRING_KIND.SERVER; input: ServerKeyringInput; adapters: ServerChainAdapterFactory[]; } & LoggerConfig): Promise<{ keyring: ServerKeyring; wallets: ServerWalletInfo[]; }>;