How to use "lockunspent" in bitcoin core wallet console?

0

Try to use the Lockunspend RPC in bitcoin core wallet console. But always get wrong, and google it can't find answer.

My input is:

lockunspent false "[{"txid":"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c","vout":0}]"

Is anyone can teach me where I am wrong? Thanks

yrm23

Posted 2018-10-02T13:38:07.063

Reputation: 41

What is the error that you get?Andrew Chow 2018-11-04T18:30:16.780

Answers

0

The problem is, you should to escape the inner quotes:

lockunspent false "[{\"txid\":\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\",\"vout\":0}]"

MCCCS

Posted 2018-10-02T13:38:07.063

Reputation: 5 827

Thanks. But it's not work. If with bitcoin-cli, your format should be work. But my problem is how to use is with bitcoin core wallet console. It seems that don't need to escape the inner quotes for console.yrm23 2018-10-02T14:08:53.717

It should work, have you tried?MCCCS 2018-10-02T14:27:42.843

10:37:01  lockunspent false "[{\"txid\":\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\",\"vout\":0}]"

10:37:01  Invalid parameter, expected unspent output (code -8) – yrm23 2018-10-02T14:37:32.930

-1

Try double quoting

lockunspent false '[{"\"txid\"":"\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\"","\"vout\"":"0"}]'

mikeytown2

Posted 2018-10-02T13:38:07.063

Reputation: 99

please explain why this is down votedmikeytown2 2019-04-11T18:48:36.830