I have been trying to setup a watch-only wallet on Bitcoin Core using the importdescriptors command. To put this into context, I'm trying to use the watch-only wallet on my online machine to create PSBT then sign transactions on a different machine offline.

No matter how I type the command I always get "Error: Error parsing JSON:".

The command I typed is this one on testnet:

importdescriptors [{"desc":"pkh([0e40c862/44h/1h/0h]tpubDCaMqQiGwzuDcCigY2213yHeJqiQEeFKHPJ8KJdWdh6F6hcKjQmDNU4tdwVNQ7PUpSJfs8subNajEs27YpS5cyfet7LQSTsgCTsvqx3ted4/0/*)#8r64ejp4","timestamp":1694822561,"internal":false}]

From another post I noticed that was fixed by removing all spaces in the commands but that hasn't worked for me unfortunately. I’m using this command in bitcoin-qt console on ubuntu linux.

Any help appreciated, thanks!

1 Answer 1


The entire JSON string needs to be surrounded by single quotes so that the console knows to pass the whole thing to the JSON parser.

Your command should be:

importdescriptors '[{"desc":"pkh([0e40c862/44h/1h/0h]tpubDCaMqQiGwzuDcCigY2213yHeJqiQEeFKHPJ8KJdWdh6F6hcKjQmDNU4tdwVNQ7PUpSJfs8subNajEs27YpS5cyfet7LQSTsgCTsvqx3ted4/0/*)#8r64ejp4","timestamp":1694822561,"internal":false}]'

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.