UNPKG

@metamask/eth-trezor-keyring

Version:

A MetaMask compatible keyring, for trezor hardware wallets

25 lines 1.29 kB
import { HardwareWalletError } from "@metamask/hw-wallet-sdk"; import type { ErrorMapping } from "@metamask/hw-wallet-sdk"; /** * Factory function to create a HardwareWalletError from a Trezor error identifier. * * @param trezorErrorIdentifier - The Trezor error identifier (e.g., 'Device_Disconnected', 'Method_Cancel') * @param context - Optional additional context to append to the error message * @returns A HardwareWalletError instance with mapped error details */ export declare function createTrezorError(trezorErrorIdentifier: string, context?: string): HardwareWalletError; /** * Checks if a Trezor error identifier exists in the error mappings. * * @param trezorErrorIdentifier - The Trezor error identifier to check * @returns True if the error identifier is mapped, false otherwise */ export declare function isKnownTrezorError(trezorErrorIdentifier: string): boolean; /** * Gets the error mapping details for a Trezor error identifier without creating an error instance. * * @param trezorErrorIdentifier - The Trezor error identifier to look up * @returns The error mapping details or undefined if not found */ export declare function getTrezorErrorMapping(trezorErrorIdentifier: string): ErrorMapping | undefined; //# sourceMappingURL=trezor-errors.d.cts.map