import type { TypedTransaction } from "@ethereumjs/tx"; import type { MessageTypes, TypedMessage } from "@metamask/eth-sig-util"; import { SignTypedDataVersion } from "@metamask/eth-sig-util"; import type { Keyring } from "@metamask/keyring-utils"; import { Hex } from "@metamask/utils"; import type OldEthJsTransaction from "ethereumjs-tx"; import HDKey from "hdkey"; import { AppConfigurationResponse, GetAppNameAndVersionResponse, LedgerBridge, LedgerBridgeOptions } from "./ledger-bridge.cjs"; declare enum NetworkApiUrls { Ropsten = "https://api-ropsten.etherscan.io", Kovan = "https://api-kovan.etherscan.io", Rinkeby = "https://api-rinkeby.etherscan.io", Mainnet = "https://api.etherscan.io" } export type AccountPageEntry = { address: string; balance: number | null; index: number; }; export type AccountPage = AccountPageEntry[]; export type AccountDetails = { index?: number; bip44?: boolean; hdPath?: string; }; export type LedgerBridgeKeyringOptions = { hdPath: string; accounts: Hex[]; deviceId: string; accountDetails: Readonly>; accountIndexes: Readonly>; implementFullBIP44: boolean; }; export type LedgerKeyringSerializedState = Partial; export declare class LedgerKeyring implements Keyring { #private; static type: string; deviceId: string; readonly type: string; page: number; perPage: number; unlockedAccount: number; accounts: readonly Hex[]; accountDetails: Record; hdk: HDKey; hdPath: string; paths: Record; network: NetworkApiUrls; implementFullBIP44: boolean; bridge: LedgerBridge; constructor({ bridge }: { bridge: LedgerBridge; }); init(): Promise; destroy(): Promise; serialize(): Promise>; deserialize(opts: LedgerKeyringSerializedState): Promise; setDeviceId(deviceId: string): void; getDeviceId(): string; isUnlocked(): boolean; isConnected(): boolean; setAccountToUnlock(index: number): void; setHdPath(hdPath: string): void; unlock(hdPath?: string, updateHdk?: boolean): Promise; addAccounts(amount: number): Promise; getName(): string; getFirstPage(): Promise; getNextPage(): Promise; getPreviousPage(): Promise; getAccounts(): Promise; removeAccount(address: string): void; attemptMakeApp(): Promise; updateTransportMethod(transportType: string): Promise; getAppNameAndVersion(): Promise; getAppConfiguration(): Promise; signTransaction(address: Hex, tx: TypedTransaction | OldEthJsTransaction): Promise; signMessage(withAccount: Hex, data: string): Promise; signPersonalMessage(withAccount: Hex, message: string): Promise; unlockAccountByAddress(address: Hex): Promise; signTypedData(withAccount: Hex, data: TypedMessage, options?: Options): Promise; signEip7702Authorization(withAccount: Hex, authorization: [chainId: number, contractAddress: Hex, nonce: number]): Promise; forgetDevice(): void; } export {}; //# sourceMappingURL=ledger-keyring.d.cts.map