Ethereum icon

Ethereum

Interact with Ethereum blockchain

Actions6

Overview

This node enables interaction with the Ethereum blockchain, specifically focusing on wallet management under the "Wallet" resource. The "Create Wallet" operation allows users to generate one or multiple new Ethereum wallets programmatically. This is useful in scenarios such as:

  • Generating fresh wallets for testing or development purposes.
  • Creating multiple wallets for batch processing or distribution.
  • Automating wallet creation workflows in decentralized applications (dApps).

For example, a user can create 5 new Ethereum wallets at once, each with its own address, private key, and mnemonic phrase, which can then be used for further blockchain interactions.

Properties

Name Meaning
RPC URL Ethereum RPC endpoint URL to connect to the blockchain network. Optional; defaults to https://ethereum-rpc.publicnode.com.
Number of Wallets Number of new Ethereum wallets to create. Must be a positive integer.

Output

The output JSON structure depends on the number of wallets requested:

  • If only one wallet is created (Number of Wallets = 1), the output contains a single wallet object with:

    • address: The Ethereum wallet address.
    • privateKey: The private key corresponding to the wallet.
    • mnemonic: The mnemonic phrase (seed phrase) for the wallet, if available.
  • If multiple wallets are created (Number of Wallets > 1), the output contains an object with:

    • wallets: An array of wallet objects, each containing address, privateKey, and mnemonic.
    • count: The total number of wallets created.

Example output for a single wallet:

{
  "address": "0x1234...abcd",
  "privateKey": "0xabcdef...",
  "mnemonic": "test test test ..."
}

Example output for multiple wallets:

{
  "wallets": [
    {
      "address": "0x1234...abcd",
      "privateKey": "0xabcdef...",
      "mnemonic": "test test test ..."
    },
    {
      "address": "0x5678...efgh",
      "privateKey": "0x123456...",
      "mnemonic": "example example example ..."
    }
  ],
  "count": 2
}

The node does not output binary data for this operation.

Dependencies

  • Requires connection to an Ethereum RPC endpoint, which can be specified via the RPC URL property. If none is provided, it defaults to a public Ethereum RPC endpoint.
  • Uses the ethers library internally for wallet generation and blockchain communication.
  • No API keys or credentials are required specifically for wallet creation since it generates wallets locally without interacting with external services.

Troubleshooting

  • Common Issues:

    • Invalid or unreachable RPC URL may cause connection failures when attempting to interact with the blockchain (though wallet creation itself is local and should not fail due to RPC issues).
    • Requesting zero or negative number of wallets will likely cause errors or unexpected behavior; ensure Number of Wallets is a positive integer.
  • Error Messages:

    • Errors related to RPC connectivity typically do not affect wallet creation but may appear if other operations are attempted.
    • If the node throws an error about missing credentials, verify that you are using the correct resource and operation, as wallet creation does not require credentials.

Links and References

Discussion