Architecture
Last updated
Last updated
Keechain's architecture is modular and consists of the following layers:
Presentation Layer
Application Layer
Integration Layer
Data Layer
Each layer is designed to handle specific responsibilities, ensuring a clean separation of concerns and facilitating maintainability and scalability.
This layer is responsible for the user interface (UI) and user experience (UX), providing an intuitive and responsive interface for users to interact with the wallet.
Framework: Built using for component-based architecture, enabling reusable UI components.
State Management: Utilizes Chorme for predictable state management across the application.
Routing: Employs for managing navigation within the extension.
Styling: Incorporates CSS-in-JS libraries like for modular and maintainable styling.
Accessibility: Follows to ensure accessibility for all users.
Dashboard: Displays an overview of the user's assets, recent transactions, and network status.
Asset Management: Interfaces for sending, receiving, and viewing detailed information about tokens.
Swap Interface: Allows users to perform token swaps directly within the wallet.
Bridge Interface: Facilitates cross-chain asset transfers using Keeta's anchor system.
Settings: Provides options for managing wallet preferences, security settings, and network configurations.
Handles the core business logic of the wallet, orchestrating operations between the UI and the underlying services.
Transaction Management: Constructs, signs, and broadcasts transactions to the Keeta Network.
Swap Operations: Integrates with decentralized exchange (DEX) protocols to facilitate in-wallet token swaps.
Bridge Operations: Manages the logic for cross-chain asset transfers via Keeta's anchor system.
Validation: Implements input validation and error handling to ensure robust operations.
Middleware: Uses middleware to handle asynchronous actions and side effects, such as API calls and complex computations.
User Action: A user initiates a token swap.
Validation: The application layer validates the input parameters.
Quote Retrieval: Fetches swap rates and fees from integrated DEXs.
Transaction Construction: Builds the transaction with the appropriate parameters.
Signing: Signs the transaction using the user's private key.
Broadcasting: Sends the signed transaction to the Keeta Network.
Feedback: Updates the UI with the transaction status and confirmation details.
Manages communication with external services, including blockchain networks, DEXs, and bridge protocols.
Keeta Network RPC: Interacts with Keeta Network nodes via Remote Procedure Calls (RPC) to fetch blockchain data and submit transactions.
DEX Integration: Connects with decentralized exchanges through their APIs to facilitate token swaps.
Bridge Protocols: Interfaces with Keeta's anchor system to manage cross-chain asset transfers.
Web3 Providers: Utilises the native sdks dependant on which chain is selected into the network settings.
Error Handling: Implements retry mechanisms and fallback strategies to handle network failures and ensure reliability.
Request Initiation: The application layer sends a request to the integration layer.
Service Interaction: The integration layer communicates with the appropriate external service (e.g., Keeta RPC node, DEX API).
Response Handling: Processes the response and returns the data to the application layer.
Error Management: Handles any errors or exceptions that occur during the interaction.
Responsible for the secure storage and retrieval of user data, including private keys, transaction history, and user preferences.
Secure Storage: Utilises chromes buiot in encrypted data storage
Encryption: Employs AES-256 encryption for storing private keys and seed phrases, with keys derived from user passwords using PBKDF2.
Data Management: Implements data schemas and indexing for efficient storage and retrieval of transaction history and user settings.
Backup and Recovery: Provides functionality for users to back up and restore their wallets using encrypted seed phrases.
Data Synchronization: Ensures that data is consistently synchronized between the UI and the underlying storage.
Access Control: Implements strict access controls to prevent unauthorized access to sensitive data.
Data Integrity: Uses checksums and validation mechanisms to ensure data integrity.
Regular Audits: Conducts regular security audits and code reviews to identify and mitigate potential vulnerabilities.