What happens on Bitcoin Core once I generate new address and send BTC? Does it in logic add to the existing balance in the wallet? or does this create a new wallet?
#askNostr Exploring self-custody
What happens on Bitcoin Core once I generate new address and send BTC? Does it in logic add to the existing balance in the wallet? or does this create a new wallet?
#askNostr Exploring self-custody
when you generate a new address it appends the public private key pair to the wallet.dat file of the active wallet.
when sending a bitcoin transaction, Bitcoin Core generates change addresses in a similar fashion.
your balance in bitcoin core refers to the utxos that can be spent using the public/private key pairs in wallet.dat
tangent: createrawtransaction does NOT generate change addresses and is one of the most common ways to lose bitcoin by overpaying mining fees
Got it. So it’s as sending to the same wallet but through different address?
the wallet is a collection of public private key pairs. strictly speaking each time the wallet is used a new version is created (i.e. an old wallet.dat file cant derive addresses a new wallet creates) so best practice you should be backing up your wallet.dat file regularly
storing a digital file has its own challenges which is why some users elect to use seed phrases and wallet descriptors instead as it offers some flexibility in terms of storage
keep in mind what you find comfortable doing now may not be the same thing a few years down the road
fair warning ⚠️ now I’m scared to try it. should i use one of these? a seed phrase or descriptors?
you should understand what both are and how they relate to one another.
a good way to practice is to generate a seed phrase, choose a derivation path, and try to recreate the same list of keys using Bitcoin Core (importdescriptors).
you should be able to do this without making any transactions 🧐
Two transactions will result in two UTXOs. You could then merge them into a single UTXO. You don’t want to have a bunch of small UTXOs as it could become difficult to spend in the future, depending on how high transaction fees are in the future.
Mmh. And to merge these would take sending both utxos to one address?
In one transaction, yes.
Yes. You could merge any number of UTXOs into one, using a single transaction