@metamask/eth-ledger-bridge-keyring
Version:
A MetaMask compatible keyring, for ledger hardware wallets
13 lines • 669 B
text/typescript
import type { DeviceExchangeError } from "@ledgerhq/device-management-kit";
/**
* Construct a mock {@link DeviceExchangeError} for tests.
*
* The DMK `DeviceExchangeError` is normally raised inside the DMK runtime;
* tests need a structurally-equivalent value without going through DMK.
* This helper centralises the cast so test files don't each roll their own.
*
* @param errorCode - The hex error code to embed (e.g. `'6985'`).
* @returns A mock `DeviceExchangeError<TErrorCode>`.
*/
export declare function createMockDeviceExchangeError<TErrorCode = string>(errorCode: TErrorCode): DeviceExchangeError<TErrorCode>;
//# sourceMappingURL=mock-error.d.cts.map