0

I have some keys obtained from walletdump,

13LJXzFwARH5N2bR1AV38Nf9qDVw53PjiB
1BcBMuEJJzEY36PmKWTFmYRxEF3YaSEiKN
1NeZCnuSW9NG8F147VNf8JSLKWGcVexZ32


8e576cbf85a8f529b8b1704deecd122ec8e542761c81928866af3af5825ec016
be9cf54f7d6aba2ab730f8cb4c61b9ff3587b887f12bb6cbfd0eeb158364ce44
3922ccf671581b81201d18c9258d6e0cd1d2a5ea42f20323692f90bb7ac4e45c
e8ba7c776506a8e774db816d65a90f6cb6c1861bb10edc077bbdace058a8bcad
276f7c05b7a3d92281ee4c6ea1240beb41fda59db1c2ca16cf42a1509ffd9e36
b8b42b10f67c7cc83dd736f183f7a919e6f7a1a73513ad31aabc10fb77866e60

0033598d96cf61c76369f9f3bff2cae0bc54d0375b8fe57d475859d6b8bac3b8
002c15a780f0ce0e0407f75b2afb1d6108e66d528098c5568ada47222b58edac
00d9ba3daf22a3a9febbf25b62c1468c48b85389be52838b5133d3155683d28d

# also private keys

How can I properly use importmulti and put all my keys there?

Any answer would be appreciated.

1 Answer 1

1

Here's a basic example of how you can use importmulti:

bitcoin-cli importmulti '[{"scriptPubKey": {"address": "13LJXzFwARH5N2bR1AV38Nf9qDVw53PjiB"}, "timestamp":0}]'

In this example, we are importing a single address. You can extend this to include all your addresses. However, keep in mind that using importmulti with private keys directly in the command line is not secure, as it may expose your private keys to other users on your system.

Here is an example with multiple addresses and their corresponding private keys:

bitcoin-cli importmulti '[{"scriptPubKey": {"address": "13LJXzFwARH5N2bR1AV38Nf9qDVw53PjiB"}, "timestamp":0},{"scriptPubKey": {"address": "1BcBMuEJJzEY36PmKWTFmYRxEF3YaSEiKN"}, "timestamp":0},{"scriptPubKey": {"address": "1NeZCnuSW9NG8F147VNf8JSLKWGcVexZ32"}, "timestamp":0}]' '[{"keys": ["private_key_1", "private_key_2", "private_key_3"], "timestamp":0}]' '{"rescan": false}'

Make sure to replace "private_key_1", etc., with your actual private keys.

it's crucial to handle private keys securely. Storing them in plaintext in commands or scripts is not recommended.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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