Understand the MetaMask CLI Integration module
mainThe moccasin.metamask_cli_integration module provides a decoupled layer that allows the Moccasin CLI to interact with the MetaMask browser extension. Instead of handling private keys directly in the CLI, this module delegates transaction signing and account management to the MetaMask UI.
Core Capabilities:
- Transaction Delegation: Pushes transaction requests to MetaMask for user confirmation and receives the resulting transaction hashes or errors.
- UI Management: Automatically launches and manages a MetaMask UI tab for network synchronization and account connection.
- Connection Monitoring: Uses a heartbeat mechanism to detect if the browser tab is closed unexpectedly.
- Security: Enhances security by avoiding direct private key handling within the CLI environment.