0

I'm trying to send bitcoins from node2 with my address using private key noted that my address is created in node1.I followed this link: "https://en.bitcoin.it/wiki/How_to_import_private_keys" I dump private key in node1 using this command:

bitcoin-cli -testnet -rpcuser=test -rpcpassword=test123 dumpprivkey "2N7YvA6ZBjFvXE3wuNQH4csev1QUWtrzYgA"

Then I imported private key in node2 through this command:

bitcoin-cli -testnet -rpcuser=test -rpcpassword=test123 importprivkey cNKbGVQvQgJsJuRy25ggZ71BRA9UZyEPCMekdntnZDWjYTg9TpRu

now I want to send bitcoin from node2 with my address to different address

can anyone please give me solution to make transaction using my address private key thanking you in advance

0

You can use createrawtransaction to create a raw transaction, in which you can specify your custom inputs and outputs. In this case you would specify the input to be the address from node2, and output/outputs to be addresses you are sending bitcoins to. Use signrawtransaction to sign raw transaction it using your imported private key and sendrawtransaction to send it to the network.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.