I have created a private test net in geth and trying to create a an account in my private net in python
from web3 import Web3, IPCProvider
web3 = Web3(IPCProvider("../Blockchain/PrivateNet/geth.ipc"))
web3.eth.accounts[0]
web3.eth.account.create('Pass')
web3.eth.accounts[0] is returning correct result ie. the first account in my private-net
but
web3.eth.account.create('Pass') doesnt create any account in the privte-net, it create a local account it returns :
eth_account.local.LocalAccount object at 0x7fe748076588
Best Answer
Private keys/EAO accounts are valid on all Ethereum chains -- testnets and mainnet included. This means that the
LocalAccount
object you're creating will be able to recieve tokens and ether on your test network (as well as the Ethereum foundation network).Technically, you don't need anything connected to the internet to generate an account. You just need to know the ingredients to make a private key and generate an address -- all of that can happen without the Ethereum network or specifying which network you want to use the key on.