bitcoin-cli -regtest command test:
-
getnewaddress -> ./bitcoin-cli -regtest getnewaddress -> new address is generated (2NCpFNkCDDmpLWQM6Be8TC5MuM3zJpAgAyh)
-
getbalance -> ./bitcoin-cli -regtest getbalance -> show the current balance (150.00000000)
-
dumpwallet -> ./bitcoin-cli -regtest dumpwallet “…/regtest.txt” -> exports all private keys into “regtest.txt”
-
listaddressgroupings -> ./bitcoin-cli -regtest listaddressgroupings -> get wallet address
-
dumpprivkey-> ./bitcoin-cli -regtest dumpprivkey “address” -> shows the private key to this wallet address