Bitcoin Stack Trade is a query and reply web site for Bitcoin crypto-currency fans. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
The most effective solutions are voted up and rise to the highest
Requested
Considered
204 occasions
I am attempting to ship bitcoins from node2 with my tackle utilizing personal key famous that my tackle is created in node1.I adopted this hyperlink:
“https://en.bitcoin.it/wiki/How_to_import_private_keys”
I dump personal key in node1 utilizing this command:
bitcoin-cli -testnet -rpcuser=take a look at -rpcpassword=test123 dumpprivkey "2N7YvA6ZBjFvXE3wuNQH4csev1QUWtrzYgA"
Then I imported personal key in node2 by means of this command:
bitcoin-cli -testnet -rpcuser=take a look at -rpcpassword=test123 importprivkey cNKbGVQvQgJsJuRy25ggZ71BRA9UZyEPCMekdntnZDWjYTg9TpRu
now I wish to ship bitcoin from node2 with my tackle to completely different tackle
can anybody please give me resolution to make transaction utilizing my tackle personal key
thanking you upfront
1
I carried out the state of affairs described, utilizing these instructions:
// create a brand new pockets. Further choices are wanted to not create a descriptor-based pockets, to have the ability to dump privkey
bitcoin-cli -testnet -rpcuser=XXX -rpcpassword=XXX createwallet "test1" false false "" false false
bitcoin-cli ... getwalletinfo
// generate an tackle
bitcoin-cli ... getnewaddress
--> tb1qha...zxejw7
// dump its personal key
bitcoin-cli ... dumpprivkey "tb1qha...zxejw7"
--> cRJzVP...cZTcV5
// ship some funds to this tackle
bitcoin-cli ... getwalletinfo
// in one other occasion, create one other pockets
bitcoin-cli ... createwallet "test2" false false "" false false
bitcoin-cli ... getwalletinfo
// import privkey of earlier tackle. This could take a very long time (many minutes), attributable to rescanning
bitcoin-cli ... importprivkey "cRJzVP...cZTcV5"
bitcoin-cli ... getwalletinfo
--> steadiness of the tackle reveals up right here
// Carry out a ship to a different tackle
bitcoin-cli ... sendtoaddress "tb1qp2...n9qw92" 0.0001 "" "" true
bitcoin-cli ... getwalletinfo
You need to use createrawtransaction to create a uncooked transaction, in which you’ll be able to specify your customized inputs and outputs.
On this case you’d specify the enter to be the tackle from node2, and output/outputs to be addresses you’re sending bitcoins to. Use signrawtransaction to signal uncooked transaction it utilizing your imported personal key and sendrawtransaction to ship it to the community.