UNPKG

@metamask/eth-ledger-bridge-keyring

Version:
40 lines 1.42 kB
import type Transport from "@ledgerhq/hw-transport"; import { MetaMaskLedgerHwAppEth } from "./ledger-hw-app.cjs"; export interface TransportMiddleware { setTransport(transport: Transport): void; getTransport(): Transport; getEthApp(): MetaMaskLedgerHwAppEth; dispose(): Promise<void>; } /** * LedgerTransportMiddleware is a middleware to communicate with the Ledger device via transport or LedgerHwAppEth */ export declare class LedgerTransportMiddleware implements TransportMiddleware { #private; readonly mainAppName = "BOLOS"; readonly ethAppName = "Ethereum"; readonly transportEncoding = "ascii"; /** * Method to close the transport connection. */ dispose(): Promise<void>; /** * Method to set the transport object. * * @param transport - The transport object for communicating with a Ledger hardware wallet. */ setTransport(transport: Transport): void; /** * Method to retrieve the transport object. * * @returns An generic interface for communicating with a Ledger hardware wallet. */ getTransport(): Transport; /** * Method to get a new instance of the eth app object. * * @returns An generic interface for communicating with a Ledger hardware wallet to perform operation. */ getEthApp(): MetaMaskLedgerHwAppEth; } //# sourceMappingURL=ledger-transport-middleware.d.cts.map