import type { Signer } from "@sovereign-sdk/signers";
import { Wallet } from "./wallet";
/**
 * Type guard to check if a signer is a Ledger Solana signer.
 * This allows checking the signer type without importing Ledger-specific dependencies.
 */
export declare function isLedgerSolanaSigner(signer: Signer): signer is Signer & {
    readonly __ledgerSolanaSigner: true;
};
/**
 * LedgerSolanaSigner interface matching the @sovereign-sdk/signers implementation.
 * This allows us to work with the Ledger signer without directly importing
 * the browser-specific or node-specific implementations.
 */
export interface LedgerSolanaSigner extends Signer {
    readonly __ledgerSolanaSigner: true;
    disconnect(): Promise<void>;
}
/**
 * A Wallet implementation that uses a Ledger hardware wallet for signing.
 *
 * This wallet wraps a LedgerSolanaSigner from @sovereign-sdk/signers and is
 * compatible with the Bullet SDK's Client class.
 *
 * @example
 * ```typescript
 * // Browser environment - use default export from @sovereign-sdk/signers/ledger-solana
 * import { LedgerSolanaSigner } from "@sovereign-sdk/signers/ledger-solana";
 *
 * const ledgerSigner = new LedgerSolanaSigner();
 * const wallet = await LedgerWallet.fromSigner(ledgerSigner);
 *
 * // Create client with Ledger wallet - will auto-detect and use "solana" authenticator
 * const client = await Client.fromNetwork("mainnet", wallet);
 * ```
 *
 * @example
 * ```typescript
 * // Node.js environment - use node export
 * import { LedgerSolanaSigner } from "@sovereign-sdk/signers/ledger-solana/node";
 *
 * const ledgerSigner = new LedgerSolanaSigner();
 * const wallet = await LedgerWallet.fromSigner(ledgerSigner);
 * ```
 */
export declare class LedgerWallet extends Wallet {
    private ledgerSigner;
    /**
     * @internal
     * Use LedgerWallet.fromSigner() to create instances.
     */
    private constructor();
    /**
     * Creates a LedgerWallet from a LedgerSolanaSigner instance.
     *
     * This is an async factory method because getting the public key from
     * the Ledger device requires an async operation.
     *
     * @param ledgerSigner - A LedgerSolanaSigner instance from @sovereign-sdk/signers
     * @returns A Promise that resolves to a LedgerWallet instance
     *
     * @example
     * ```typescript
     * import { LedgerSolanaSigner } from "@sovereign-sdk/signers/ledger-solana";
     *
     * const signer = new LedgerSolanaSigner("44'/501'/0'/0'");
     * const wallet = await LedgerWallet.fromSigner(signer);
     * ```
     */
    static fromSigner(ledgerSigner: LedgerSolanaSigner): Promise<LedgerWallet>;
    /**
     * Signs a message using the Ledger device.
     *
     * @param message - The message to sign as a Uint8Array
     * @returns A Promise that resolves to the signature as a Uint8Array
     */
    signMessage(message: Uint8Array): Promise<Uint8Array>;
    /**
     * Returns the Ledger signer for use with the Sovereign SDK rollup.
     *
     * The returned signer has the `__ledgerSolanaSigner` marker which allows
     * the SDK to auto-detect that it should use the "solana" authenticator
     * (with preamble) when `authenticator: "solanaAuto"` is specified.
     */
    getSigner(): LedgerSolanaSigner;
    /**
     * Disconnects from the Ledger device.
     *
     * Call this when you're done using the wallet to properly close
     * the USB/HID transport connection.
     */
    disconnect(): Promise<void>;
}
//# sourceMappingURL=ledgerWallet.d.ts.map