evm_import_wallet
Restore an EVM wallet from a private key or BIP39 mnemonic and optionally set a BIP44 derivation path to recover or migrate accounts across supported chains.
Instructions
Import existing wallet from private key or BIP39 mnemonic with custom derivation path.
Reconstructs wallet from either a raw private key or mnemonic seed phrase. Supports custom BIP44 derivation paths for advanced use cases. Essential for wallet recovery and migration.
CRITICAL RULES:
Must provide either privateKey OR mnemonic (not both, not neither)
Private keys are 64 hex characters (with or without 0x prefix)
Mnemonics are 12 or 24 words separated by spaces
Custom derivation paths must follow BIP44 format
Imported wallet works across all EVM chains
PARAMETERS:
chain: EVM chain context (required)
Doesn't affect import (same wallet works everywhere)
Used for consistency with other wallet tools
privateKey: Raw private key (optional - use if you have key)
Format: 0x followed by 64 hex characters OR 64 hex without prefix
Example: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
Takes precedence if both privateKey and mnemonic provided
mnemonic: BIP39 seed phrase (optional - use if you have mnemonic)
12 or 24 words separated by single spaces
Example: "test test test test test test test test test test test junk"
Requires derivationPath parameter to generate specific address
derivationPath: BIP44 path (optional, default: m/44'/60'/0'/0/0)
Only used with mnemonic imports
Format: m/44'/60'/account'/change/index
Default generates first address (index 0)
Example: "m/44'/60'/0'/0/5" for 6th address
EXAMPLES: ✅ Import from private key: {chain: "polygon", privateKey: "0xac0974..."}
✅ Import from mnemonic (default path): {chain: "ethereum", mnemonic: "test test test..."}
✅ Import specific address from mnemonic: {chain: "bsc", mnemonic: "word1 word2...", derivationPath: "m/44'/60'/0'/0/5"}
❌ Invalid - neither key nor mnemonic: {chain: "polygon"}
❌ Invalid - wrong key format: {chain: "ethereum", privateKey: "1234"}
SUPPORTED EVM CHAINS (7 networks): • ethereum (Sepolia) - EIP-1559 enabled, ~12s blocks, moderate gas costs • polygon (Amoy) - Low fees, fast finality (~2s), layer 2 • avalanche (Fuji C-Chain) - Sub-second finality, dynamic fees • bsc (BNB Testnet) - 3s blocks, low gas costs, Binance ecosystem • arbitrum (Sepolia) - Optimistic rollup, low fees, Ethereum security • base (Sepolia) - Coinbase layer 2, EIP-1559, low fees • worldchain (World Sepolia) - World Network testnet, EIP-1559
CRITICAL GAS CONSIDERATIONS:
Ethereum: High gas costs, use gas oracle for timing
Polygon/BSC: Very low gas, safe for frequent transactions
Arbitrum/Base: L2 optimizations, ~10-50x cheaper than Ethereum
Avalanche: Dynamic fees, can spike during congestion
Always check gas price before executing transactions
TESTNET TOKENS: All chains use testnet tokens with NO REAL VALUE. Faucets available for all supported networks.
OUTPUT STRUCTURE: • success: Boolean indicating operation success • chain: Chain context used • address: Derived public address (0x...) • privateKey: Private key (0x... - KEEP SECRET) • derivationPath: Path used (only for mnemonic imports) • importMethod: "privateKey" or "mnemonic" • warning: Security reminder • executionTime: Time taken in milliseconds
COMMON MISTAKES:
Providing both privateKey and mnemonic (only one needed)
Wrong mnemonic word count (must be 12 or 24)
Invalid derivation path format
Not securing imported credentials
Importing production keys in development environments
USE CASES:
Recover wallet from backup
Migrate wallet between applications
Import MetaMask/hardware wallet addresses
Restore from mnemonic backup
Generate multiple addresses from one seed
IMPORT STRATEGIES:
Private Key: Direct import, works immediately
Mnemonic + Default Path: Import first wallet address
Mnemonic + Custom Path: Import specific account/address
Hardware Wallet Compatibility: Use standard paths
Running on Linux.
LINUX-SPECIFIC NOTES:
Package manager: apt (Ubuntu/Debian), yum (RHEL/CentOS), or pacman (Arch)
Python 3 is typically 'python3' command
GNU tools are standard
Use 'xdg-open' command to open files/applications
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>"
},
"name": "evm_import_wallet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | EVM chain context | |
| mnemonic | No | Mnemonic phrase (12 or 24 words, optional) | |
| privateKey | No | Private key (0x... or 64 hex chars, optional) | |
| derivationPath | No | BIP44 derivation path (optional, default: m/44'/60'/0'/0/0) |