From a command line, I run parity account new
.
I am then asked to enter a password (twice), and an account-address is printed.
In addition to that, a JSON file is created.
Finally, I use this NodeJS code in order to generate the private key for my account-address:
let fs = require("fs");
let keythereum = require("keythereum");
let keyObject = JSON.parse(fs.readFileSync(KEY_FILE_NAME, "utf8"));
let privateKey = keythereum.recover(MY_PASSWORD, keyObject).toString("hex");
console.log(privateKey);
Is this pair of [public address, private key] suitable for every Ethereum network?
Can I safely use it on any testnet as well as on mainnet?
Or do I need to "register" it in a network before it is considered a valid account on it?
Thank you!
UPDATE:
To elaborate a little bit, I would like to share my understanding of how things work.
Suppose that someone sends 1 ether to 0x1234567812345678123456781234567812345678
, and that no one has ever generated an account with this address.
When we check the balance of this account (on etherscan.io, for example), we will see that it stores 1 ether even though no one has ever generated it.
Now, if someone extremely lucky generates an account with this address, then they will be able to use the private key in order to withdraw the funds.
If I am correct in this description, then the immediate conclusion is that no such thing as "account registration" is required.
Am I right?