Import Wallet
Imports a wallet from a keystore file and encrypts the private key for use in Robomotion automations.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Keystore File - Path to the JSON keystore file containing the encrypted wallet.
Output
- Encrypted Private Key - The wallet's private key re-encrypted with your AES key, encoded as hexadecimal.
Options
- AES Key - The AES encryption key used to re-encrypt the private key for Robomotion.
- Password - The password protecting the keystore file.
How It Works
The Import Wallet node extracts a private key from a keystore file and re-encrypts it. When executed, the node:
- Reads the keystore file from the specified path
- Retrieves the keystore password from credentials
- Decrypts the keystore using the password
- Extracts the private key from the keystore
- Re-encrypts the private key with your AES key
- Returns the encrypted private key in hexadecimal format
Requirements
- A valid keystore file (JSON format)
- The correct password for the keystore
- An AES key for re-encryption
- File read permissions for the keystore path
Keystore File Format
Keystore files are JSON files created by Ethereum wallets:
{
"address": "742d35cc6634c0532925a3b844bc9e7595f0beb",
"crypto": {
"cipher": "aes-128-ctr",
"ciphertext": "...",
"cipherparams": {"iv": "..."},
"kdf": "scrypt",
"kdfparams": {...},
"mac": "..."
},
"id": "...",
"version": 3
}
Error Handling
The node will return errors for:
- Empty keystore file path
- File not found
- Invalid keystore format
- Incorrect password
- Missing or invalid AES key
- Decryption failures
- Re-encryption errors
Security Best Practices
- Store imported encrypted keys in Robomotion credential vault immediately
- Delete keystore files after successful import if no longer needed
- Never share keystore passwords
- Use strong, unique AES keys
- Keep backups of keystore files in secure locations
- Don't commit keystore files to version control
Usage Notes
- The keystore file remains unchanged by this operation
- The output is encrypted with your AES key, not the keystore password
- Supports standard Ethereum keystore format (version 3)
- Compatible with keystores from MetaMask, Geth, MyEtherWallet, etc.
- The private key is never exposed in plain text
- Import is a one-time operation per wallet
Example
Importing a MetaMask wallet:
Inputs:
- Keystore File:
/home/user/wallets/metamask-keystore.json
Options:
- AES Key: (from credential vault)
- Password: (keystore password from credential vault)
Output:
- Encrypted Private Key:
a1b2c3d4e5f6...(hex-encoded encrypted data)
Next steps after import:
- Store encrypted private key in credential vault
- Use Get Wallet Address to verify the address
- Use Create Client with the encrypted key for transactions
Common Use Cases
Migrating Wallets: Import wallets from other Ethereum tools into Robomotion.
Multi-Wallet Management: Import multiple wallets for different purposes or clients.
Legacy Wallet Access: Access wallets created years ago with old tools.
Team Wallet Sharing: Import shared wallets for organizational use.
Recovery: Import wallets from backup keystore files.
Development Setup: Import test wallets into automation environment.
Supported Wallet Sources
MetaMask: Export account as keystore file from account details.
Geth: Keystore files in the keystore directory.
MyEtherWallet (MEW): Download keystore file when creating wallet.
Parity: Account JSON files from Parity keystore.
Hardware Wallets: Some hardware wallets can export keystore files (check device documentation).
Complete Import Flow
- Export Keystore - From your wallet application
- Store Securely - Save keystore file safely
- Create AES Key - Generate or use existing AES key
- Import Wallet - Use this node to import
- Store Encrypted Key - Save to credential vault
- Verify - Use Get Wallet Address to confirm
- Cleanup - Securely delete keystore if no longer needed
Keystore vs Encrypted Private Key
Keystore File:
- Protected by a password
- Standard Ethereum format
- Portable across tools
- Larger file size (contains extra metadata)
Encrypted Private Key (Robomotion):
- Protected by AES key
- Smaller (just the key)
- Optimized for automation
- Stored in credential vault
Error Scenarios
"Cannot read keystore file"
- File path is incorrect
- File doesn't exist
- Permission denied
"Cannot decrypt keystore"
- Wrong password
- Corrupted keystore file
- Unsupported keystore version
"Cannot encrypt private key"
- Invalid AES key
- AES key format error
Verification After Import
Verify the import was successful:
- Import Wallet - Get encrypted private key
- Get Wallet Address - Use encrypted key to get address
- Compare - Verify address matches keystore address
- Test - Create Client and check balance
Alternative Import Methods
Direct Private Key: If you have a raw private key (not in keystore):
- Encrypt it manually with your AES key
- Store in credential vault
- Use with Create Client
Mnemonic/Seed Phrase: Not directly supported. Convert to keystore first using:
- MyEtherWallet
- MetaMask
- Other Ethereum tools
The keystore password is only used during import. After importing, the encrypted private key is protected by your AES key. Make sure to store the AES key securely in credentials.
Never store keystore passwords or AES keys in your automation flow code. Always use Robomotion's credential vault for sensitive data.
After successful import, verify the wallet address matches what you expect before funding it or using it in production.
Keystore Password Management
- Use strong, unique passwords for keystores
- Store passwords in credential vault, not in flow variables
- Consider password rotation for long-term wallets
- Document which password protects which keystore
- Keep password backups in secure locations