Skip to main content

Export Wallet

Exports a wallet from Robomotion to a standard Ethereum keystore file for use with other wallet applications.

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.
info

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 where the keystore file will be saved (e.g., "/home/user/exported-wallet.json").

Output

This node has no outputs.

Options

  • Encrypted Private Key - The encrypted private key from credential vault.
  • AES Key - The AES key used to decrypt the private key.
  • Password - The password that will protect the exported keystore file.

How It Works

The Export Wallet node creates a standard Ethereum keystore file. When executed, the node:

  1. Retrieves the encrypted private key and AES key from credentials
  2. Decrypts the private key using the AES key
  3. Retrieves the export password from credentials
  4. Derives the wallet address from the private key
  5. Encrypts the private key using the password and standard keystore format
  6. Writes the keystore JSON file to the specified path

Requirements

  • An encrypted private key in the credential vault
  • The corresponding AES key for decryption
  • A password for the new keystore file
  • Write permissions for the target directory
  • Sufficient disk space for the keystore file

Error Handling

The node will return errors for:

  • Empty keystore file path
  • Invalid encrypted private key format
  • Decryption failures
  • Invalid AES key
  • Missing password
  • File write permission errors
  • Invalid file path or directory

Security Best Practices

  • Use strong passwords for keystore files
  • Store keystore files in secure, encrypted locations
  • Don't share keystore files publicly
  • Keep backup copies in multiple secure locations
  • Set appropriate file permissions (read-only for owner)
  • Delete old keystores when no longer needed
  • Never commit keystores to version control

Usage Notes

  • Creates a standard Ethereum keystore file (version 3)
  • Compatible with MetaMask, MEW, Geth, and other Ethereum wallets
  • The keystore file includes the wallet address in the filename
  • Uses standard scrypt parameters for encryption
  • File is written with 0777 permissions (should be restricted after creation)
  • The private key in Robomotion remains unchanged

Example

Exporting a wallet for MetaMask:

Inputs:

  • Keystore File: /home/user/exports/wallet-backup.json

Options:

  • Encrypted Private Key: (from credential vault)
  • AES Key: (from credential vault)
  • Password: (new keystore password from credential vault)

Result: A keystore file is created at the specified path.

Using the exported keystore:

  1. Open MetaMask
  2. Click "Import Account"
  3. Select "JSON File"
  4. Choose the exported keystore file
  5. Enter the password
  6. Wallet imported successfully

Common Use Cases

Backup Creation: Export wallets to keystore files for secure backup.

Wallet Migration: Move wallets from Robomotion to other applications.

Multi-Tool Usage: Use the same wallet in both Robomotion and MetaMask.

Team Distribution: Share wallets with team members (via keystore + password).

Recovery Preparation: Create keystores as part of disaster recovery plan.

Archive: Export and archive old wallets for long-term storage.

Keystore File Structure

The exported file is a JSON document:

{
"address": "742d35cc6634c0532925a3b844bc9e7595f0beb",
"crypto": {
"cipher": "aes-128-ctr",
"ciphertext": "...",
"cipherparams": {
"iv": "..."
},
"kdf": "scrypt",
"kdfparams": {
"dklen": 32,
"n": 262144,
"p": 1,
"r": 8,
"salt": "..."
},
"mac": "..."
},
"id": "...",
"version": 3
}

Complete Export Flow

  1. Verify Wallet - Use Get Wallet Address to confirm the wallet
  2. Choose Password - Create strong password for keystore
  3. Export Wallet - Create keystore file
  4. Secure File - Move to secure location
  5. Test Import - Verify keystore works in target application
  6. Backup - Create multiple copies
  7. Document - Record what wallet was exported and where

Password Guidelines

Keystore password should be:

  • At least 12 characters long
  • Include uppercase and lowercase letters
  • Include numbers and symbols
  • Unique (not used for other accounts)
  • Memorable or stored in password manager

Poor passwords:

  • "password123"
  • Wallet addresses
  • Common words
  • Birth dates

Importing to Different Wallets

MetaMask:

  1. Account menu → Import Account
  2. Select JSON File
  3. Upload keystore file
  4. Enter password

MyEtherWallet:

  1. Access Wallet → Keystore File
  2. Upload keystore file
  3. Enter password

Geth:

  1. Copy keystore to keystore directory
  2. Run geth with account flag

Hardware Wallets: Most hardware wallets don't support keystore import (security feature).

File Management

Recommended organization:

/secure-backup/
wallets/
production/
main-wallet-2024-01-15.json
payment-wallet-2024-01-15.json
testing/
test-wallet-2024-01-15.json
archive/
old-wallet-2023-12-01.json

File naming conventions:

  • Include purpose: trading-bot-wallet.json
  • Include date: wallet-2024-01-15.json
  • Include network: mainnet-operations.json

Security Considerations

After exporting:

  1. Restrict file permissions: chmod 600 keystore.json
  2. Encrypt the storage location
  3. Store password separately from keystore
  4. Test recovery process
  5. Update documentation

Backup strategy:

  • Keep multiple copies in different locations
  • Use encrypted cloud storage
  • Store offline copies
  • Test backups regularly
  • Document recovery procedures

Encryption Strength

The exported keystore uses:

  • scrypt key derivation (memory-hard)
  • AES-128-CTR encryption
  • Standard Ethereum parameters (n=262144)
  • Secure random IV and salt generation

This provides strong protection when combined with a good password.

warning

The exported keystore file contains your private key encrypted with a password. Anyone with the file and password has full access to the wallet. Protect both the file and password carefully.

danger

Never upload keystore files to unsecured cloud services, email them unencrypted, or share them publicly. Treat keystores as highly sensitive data.

tip

After exporting, verify the keystore works by importing it into a test wallet before relying on it for backup or recovery purposes.

Troubleshooting

"Cannot write keystore file"

  • Check directory exists
  • Verify write permissions
  • Check disk space
  • Ensure valid file path

"Cannot decrypt private key"

  • Verify encrypted key is correct
  • Check AES key is correct
  • Ensure credentials are properly set

"Invalid password format"

  • Password must be non-empty string
  • Check credential vault entry

Recovery Testing

Regularly test your exports:

  1. Export wallet to keystore
  2. Import to test application (MetaMask, etc.)
  3. Verify address matches
  4. Test small transaction (on testnet)
  5. Document successful test date