import { type Address, type Hex, type LocalAccount } from "viem";
import type { ILocalKeyring } from "./types.js";
/** Encrypted keystore file format (ERC-55 / Geth-compatible). */
export type EncryptedKeystore = {
    version: number;
    id: string;
    address: string;
    crypto: Record<string, unknown>;
};
export type LocalKeyringOptions = {
    type: "privateKey";
    privateKey: Hex;
} | {
    type: "keystore";
    keystore: EncryptedKeystore;
    password: string;
} | {
    type: "mnemonic";
    mnemonic: string;
    derivationPath?: string;
};
/**
 * A locally-held signing key used by agents to authorize dispatches.
 * The owner key never belongs here — it stays in the user's wallet (MetaMask / WalletConnect).
 */
export declare class LocalKeyring implements ILocalKeyring {
    readonly address: Address;
    private readonly account;
    /** Present only when the keyring was constructed from a raw private key. */
    private readonly privateKey?;
    constructor(options: LocalKeyringOptions);
    /** Returns a lightweight signer stub for read-only contexts where the key is not available. */
    static fromAddress(address: Address): Pick<LocalKeyring, "address">;
    /** Generates a brand-new keyring backed by a random private key. */
    static generate(): LocalKeyring;
    /** Constructs a keyring from an existing raw private key. */
    static fromPrivateKey(privateKey: Hex): LocalKeyring;
    /**
     * The underlying viem account, for building a WalletClient
     * (e.g. `createWalletClient({ account: keyring.viemAccount, ... })`).
     */
    get viemAccount(): LocalAccount;
    /** Decrypts an in-memory keystore object with the given password. */
    static fromKeystore(keystore: EncryptedKeystore, password: string): Promise<LocalKeyring>;
    /** Loads a keyring from an encrypted JSON keystore file on disk. */
    static fromKeystoreFile(path: string, password: string): Promise<LocalKeyring>;
    /** Signs a raw 32-byte hash. Returns a 65-byte ECDSA signature. */
    sign(hash: Hex): Promise<Hex>;
    /** Internal raw-hash signer. `sign` is optional on viem's LocalAccount but is
     *  always present for privateKey/mnemonic accounts. */
    private signHash;
    /**
     * Signs a typed-data payload (EIP-712).
     * `types` must be `{ primaryType: string; types: Record<string, TypedDataParameter[]> }`.
     */
    signTyped(domain: unknown, types: unknown, value: unknown): Promise<Hex>;
    /** Exports the private key as an encrypted keystore JSON (scrypt + aes-128-ctr, geth v3). */
    exportKeystore(password: string): Promise<EncryptedKeystore>;
}
//# sourceMappingURL=keyring.d.ts.map