Web3 dApp Browser
BlockVault includes a built-in Web3 dApp browser that allows users to interact with decentralized applications directly. The browser injects wallet providers so dApps recognize BlockVault as if it were MetaMask (EVM), Phantom (Solana), or Keplr (Cosmos).
Supported Ecosystems
| Ecosystem | Injected as | Global object |
|---|---|---|
| EVM (Ethereum, Polygon, BSC, Base, Arbitrum, Optimism) | MetaMask-compatible | window.ethereum |
| Solana | Phantom-compatible | window.solana / window.phantom.solana |
| Cosmos (dYdX, Osmosis, Noble) | Keplr-compatible | window.keplr / window.cosmos |
Architecture
The browser uses a 5-layer injection stack that runs inside an InAppBrowser WebView:
Layer 5: BlockVault Globals (integrity token, referral)
Layer 4: Wallet Standard Announcer (Solana discovery)
Layer 3: Chain Providers (EvmProvider, SolanaProvider, CosmosProvider)
Layer 2: BaseProvider (EventEmitter, guards, shared utilities)
Layer 1: MessageBridge (window.__bvBridge — unified communication)
↕
InAppBrowser WebView (postMessage / executeScript)
↕
Native App (useWeb3Browser → RpcHandler → Blockchain Services)All layers are compiled into a single IIFE and injected at document start — before any dApp scripts load.
Request Flow
When a dApp calls window.ethereum.request(), the following happens:
1. dApp calls window.ethereum.request({ method, params })
2. EvmProvider sends via __bvBridge.send('evm', method, params)
3. MessageBridge creates a Promise with a unique request ID
4. postMessage sends the request to the native app
5. useWeb3Browser receives the message
6. RpcHandler validates the method and parameters
7. If approval required → show confirmation modal to the user
8. User approves → RpcHandler executes the action
9. Result is sent back to the WebView via executeScript
10. The Promise resolves and the dApp receives the resultSupported RPC Methods
Connection
| Method | Description |
|---|---|
eth_requestAccounts | Connect wallet to dApp |
eth_accounts | Get connected addresses |
connect (Solana) | Connect Solana wallet |
cosmos_enable | Connect Keplr-compatible wallet |
Transactions
| Method | Description |
|---|---|
eth_sendTransaction | Send an EVM transaction |
signTransaction (Solana) | Sign a Solana transaction |
signAndSendTransaction (Solana) | Sign and broadcast a Solana transaction |
signAllTransactions (Solana) | Batch sign multiple Solana transactions |
cosmos_signAmino | Sign a Cosmos Amino transaction |
cosmos_signDirect | Sign a Cosmos Direct (Protobuf) transaction |
Message Signing
| Method | Description |
|---|---|
personal_sign | EIP-191 message signing |
eth_signTypedData_v3 / v4 | EIP-712 typed data signing |
signMessage (Solana) | Solana message signing |
cosmos_signArbitrary | ADR-036 arbitrary signing |
Chain Management
| Method | Description |
|---|---|
wallet_switchEthereumChain | Switch the active EVM chain |
wallet_addEthereumChain | Add a custom chain |
wallet_watchAsset | Add a token to the wallet |
eth_chainId / net_version | Query current chain ID |
cosmos_switchChain | Switch Cosmos chain |
Read-Only Queries
eth_call, eth_estimateGas, eth_getBalance, eth_getTransactionCount, eth_gasPrice, eth_maxPriorityFeePerGas, eth_feeHistory, eth_blockNumber, eth_getCode, eth_getLogs, eth_getTransactionByHash, eth_getTransactionReceipt, eth_getBlockByNumber
Approval Modals
Operations that affect user funds require explicit approval:
Transaction Approval
When a dApp requests eth_sendTransaction, BlockVault shows a confirmation modal with:
- Recipient address and contract interaction detection
- Transaction amount in native currency and USD
- Gas fee estimation with adjustable speed (Slow / Normal / Fast)
- High-value transaction warnings
Message Signing
For personal_sign or eth_signTypedData, the user sees the raw message or typed data structure before approving.
Connection Request
On first connection, the dApp must be explicitly approved by the user. Connected sites are persisted so returning to a dApp does not require re-approval.
Timeouts
| Operation type | Timeout |
|---|---|
Signing methods (eth_sendTransaction, personal_sign, etc.) | 5 minutes |
Read-only methods (eth_gasPrice, eth_call, etc.) | 30 seconds |
Error Codes
BlockVault follows the EIP-1474 standard error codes:
| Code | Meaning |
|---|---|
| 4001 | User rejected the request |
| 4100 | Unauthorized (not connected) |
| 4200 | Unsupported method |
| 4900 | Disconnected |
| 4901 | Chain disconnected |
| 4902 | Unrecognized chain ID |
EIP-6963 Multi-Wallet Discovery
On EVM chains, BlockVault announces itself via the EIP-6963 standard so dApps can detect it alongside other wallets:
{
"uuid": "app.blockvault.wallet",
"name": "BlockVault",
"rdns": "app.blockvault.wallet",
"icon": "data:image/svg+xml;base64,..."
}On Solana, the Wallet Standard registration is used for multi-wallet discovery.
Provider Properties
EVM
window.ethereum.isBlockVault = true
window.ethereum.isMetaMask = true // Compatibility flag
window.ethereum.chainId = "0x1" // Hex chain ID
window.ethereum.selectedAddress = "0x..."Solana
window.solana.isBlockVault = true
window.solana.isPhantom = true // Compatibility flag
window.solana.isConnected = true/false
window.solana.publicKey.toBase58() // Base58 addressCosmos
window.keplr.isBlockVault = true
window.keplr.enable(chainId)
window.keplr.getKey(chainId) // Returns { bech32Address, pubKey, ... }
window.keplr.getOfflineSigner(chainId) // For transaction signing