I am a relative newbie in bitcoin and blockchain and hope you can help me with some of the questions. So I launched a "regtest" network and generated 101 blocks using
bitcoin-cli -regtest generate 101
Now, if I launch 'bitcoin-cli -regtest getaddressesbyaccount ""', I get the public address of my default account:
[
"mwpKJNJ4UZL7yFyj53RSVcwauGAK84UvV2"
]
And of course, I should not have any other accounts as for now. When I launch 'bitcoin-cli -regtest listunspent':
[
{
"txid": "694030f8638318c8c54054515ec716159edc494b14234885deb48f294b75a2fe",
"vout": 0,
"address": "n1queZpweTHjrMLvwSmcfrrJSQjsrYG3nG",
"scriptPubKey": "21038cadb266ed1ae6c474f5c1b74fc5f6790eacde843a673a16cfc924a100f2a679ac",
"amount": 50.00000000,
"confirmations": 101,
"spendable": true,
"solvable": true,
"safe": true
}
]
First question: I understand that the only transaction listed by "listunspent" is UTXO, meaning this is a transaction what I received to my address "n1queZpweTHjrMLvwSmcfrrJSQjsrYG3nG" with 50 BTC as amount. Where this address comes from? By what bitcoin-cli command I can see/find it in my wallet?
Second question: How can I create a new wallet with some balances and switch between them ( using bitcoin-cli )? Basically, I would like to be able to test my app using bitcoin-cli - I need to be able to create wallets, switch between them and send btc between the addresses.