This document serves primarily as a guide to Apex's key infrastructure and technical overview.
At a high-level the Apex Wallet breaks down into the following components:
- Apex Extension
- UI and Infrastructure.
- Content Injection and DApp Integration
- The RPC Engine
- On Device Storage
- Apex Backend Services
- RPC Requests for NFT, Tokens, and History
The Apex Extension
Apex allows users to manage account keys, transact Ethereum-based tokens, broadcast EVM transactions, message EVM addresses, and securely connect to decentralized applications through a compatible web browser. Apex is non-custodial, which means Apex does not hold your assets on your behalf. You own them directly, thanks to the power of cryptography and the Ethereum blockchain.
When no accounts are associated, Apex opens an onboarding window prompting a user to create or import an account. Under the hood, Apex uses the polyfill open source library to manage windows, tabs, and popups for browsers.
Once an account is created/imported, private account information is stored via password encryption directly on the device with IndexDB. Any account configuration and private data are only accessible to the extension. The Apex backend servers do not track account information besides the account's public address for messaging.
For more information on how any onboarded accounts are created and stored, please see Key Generation. Apex uses crypto-js and Ethers.js for encryption and account generation.
Apex's UI is built to be a fun, simple, and secure way to control your crypto assets and interact with the world of web3. Apex UI is built using React, Node, & Typescript. The underlying infrastructure leverages Alchemy as an RPC provider, although users can configure a custom RPC provider in-app.
Communication with Apex's servers is secured via wallet signatures authorized with user password prompts in the Apex extension. It is impossible to impersonate accounts without the private key of the EVM account.
Apex's messaging data and API is completely off-chain and maintained via Stream-Chat API. The current implementation prioritizes:
- Indexing, Speed, & Reliability
- Performance that doesn't rely on proximity to a regional data center.
- Security and Data Protection with In-Transit Encryption.
- All data is encrypted both in transit and at rest via TLS/SSL
- Data Compliance
- Including Moderation and Reporting
The messaging infrastructure allows users to securely send dynamic content types, share online statuses, and support group and p2p threads.
NFTs, Tokens, and History
Apex is excited to partner with Alchemy to provide top-notch experiences via the Alchemy API: https://docs.alchemy.com/reference/api-overview. Some of the features include:
- Automatic and Customizable token watch lists
- Full transaction history
- Send/receive messages and assets to ENS usernames instead of long addresses
- Multiple wallet support and a way to quickly switch between them
- Robust NFT support, including ERC-721s and ERC-1155s
- Native L2 support with Optimism, Arbritrum, & Polygon
Apex maintains its connection with the Alchemy RPC Provider. However, users can opt to use a custom RPC provider for transaction and balance operations.
Content Injection and DApp Integration
Communication with DApps
The Apex extension and provider communicate via a background.js service worker adhering to google chrome's manifest v3 spec.
The RPC Engine
Apex leverages the open-source library JSON RPC Engine to handle authorized requests from decentralized applications. DApp connection status and unacted requests are stored in IndexDB only on the active device.
The following outlines potential interactions between DApps and Apex.
DApps can ask Apex to
|Ask for address via ||Requires user action|
|Send transaction via ||Requires user action. Depending on the contents of the transactions we will need to show different things, e.g. if approve method for erc20 contract then show approval modal|
|Requires user action|
|RPC read calls (||Used Alchemy RPC or the custom API specified by the user.|
|Switch network via ||Switches the active network for the wallet. Requires user action|
Apex emits to DApps
|Account changed via ||Apex provider library listens for metamask_accountsChanged notification with |
|Chain changed via ||Notify via |
|Wallet connected via ||- Handled by Apex provider library and queryable by DApps by |
|Wallet disconnected via ||Emitted by the |
The Apex team is always looking to improve the product and technical approaches; if you have thoughts, comments or questions, reach out to us on the discussion page or email [email protected]!
Updated 8 months ago