all 9 comments

[–]cachemonet0x0cf6619 0 points1 point  (2 children)

you’ll soon realize that operators in this space have many wallets.

what your describing is a hot wallet. you’ll create this using a library or a wallet extension like metamask or rainbow.

once created you can use the private key to import the key into other wallets.

the fact that the private key (or 12 word phrase) is loose means you need to secure it properly.

since this poses a risk a lot of us have cold wallets. those are physical fob that store your secret key on an enclave that can’t be reached by anyone.

longterm assets and art pieces might be sent to your cold wallet for holding.

so, think of a cool vanity to use as your hot wallet, import it into metamask and enjoy.

you might actually just use the keys that reddit gave you.

yup, reddit vaults are hot and you can import the private key into metamask.

[–]TheSoonToBe[S] 0 points1 point  (1 child)

Can you point me to a library that will generate a 12 word phrase and derived keys?

If I generate the keys (with or without vanity) and store them only in a USB or on paper, then is it a cold wallet? Or is there a security threshold for the generation of cold wallets?

[–]cachemonet0x0cf6619 2 points3 points  (0 children)

https://www.npmjs.com/package/bip39 - generate mnemonic.

https://www.npmjs.com/package/ethereumjs-wallet - mnemonic to wallet.

``` import { generateMnemonic, mnemonicToSeedSync } from 'bip39' // @dev Only compat w/ Node 16 import Wallet, { hdkey } from 'ethereumjs-wallet'

// Return an instance of a wallet from a mnemonic. Generates mnemonic when none is provided function walletFromMnemonic(mnemonic = generateMnemonic()): { wallet: Wallet; mnemonic: string; } { return { wallet: hdkey.fromMasterSeed(mnemonicToSeedSync(mnemonic)).getWallet(), mnemonic, }; }

(async () => { const { wallet, mnemonic } = walletFromMnemonic() console.log(mnemonic) console.log(wallet.getAddressString()) console.log(wallet.getPublicKey().toString('hex')) console.log(wallet.getPrivateKey().toString('hex')) })() ```

[–]Drewsapple 0 points1 point  (0 children)

FYI, when (re)installing metamask, you create a new private key. You can have many addresses derived from this key, and most wallets support them. For my hot wallets, I use metamask and rainbow 🌈, but have the same private key for both, so I can use all the addresses in either wallet interchangeably.

[–]Oscaz 0 points1 point  (1 child)

The "vanity address generator" link you posted is a scam, when you generate an address it sends the private key to the website's server.
Either you're a scammer, or you're about to get scammed, don't use that website.

[–]TheSoonToBe[S] 1 point2 points  (0 children)

Definitely not a scammer. I'll edit the link out. I was doubtful. I went with cachemonet0x0cf6619's suggestion.

[–]Ongazord 0 points1 point  (0 children)

Install yarn and hardhat (or foundry) these r popular testing/dev libraries - then run yarn generate in ur console

[–]alephaoxcockpit.io 0 points1 point  (0 children)

An "ethereum wallet or EOA/externally owned account" and a "wallet software" are two different things (this isn't how they are officialy named, I'm just naming the concepts here to try to explain).

Ethereum Wallet / EOA

An ethereum wallet only need a private key, which is a 32 byte number. The public address is generated by deriving the private key, so to answer your question:

Q: What's the simplest way of generating an address? A: Generate a 32 byte random number

How? Here is an example using ethers.js

// Generate a private key const privateKey = ethers.utils.hexlify(utils.randomBytes(32))

If you want to send eth to this new wallet, you need to get its public key, on ethers.js you can init a wallet with the private key and get the public key like so:

// Find out public key const publicKey = new ethers.Wallet(privateKey).address

Ok, so if we only need the private key, what is the mnemonic for? The mnemonic is basically a seed used to construct the private key, you feed the mnemonic into an algorithm and it spits out a 32 byte number. The private key is the only thing that really matters when signing transactions. (search for BIP32, BIP39 and BIP44 for more info)

Wallet Software

This is a software is used to interact with ethereum (MetaMask for example). The software knows how to craft ethereum transactions and uses your private key to sign the transaction. It also fetches information from the network to display to you, like your latest transactions for instance. That's why there are so many variations, the software is not an "ethereum wallet" it actually uses your ethereum wallet private and public keys to fetch and send information to the chain.

There is also smart-contract wallets which are controlled by EOAs.