lockunspent API

+1 vote
I tried using this command - "lockunspent unlock '{"txid":"txid","vout":n}'. Its giving me a JSON parse error on the 'unlock' word. Can you send a sample
asked Aug 27, 2015 by anonymous

1 Answer

0 votes

You need to pass true or false for the 'unlock' parameter e.g. to lock, set unlock to false.

To lock the tx output:

./multichain-cli demochain lockunspent false

'''[{"txid":"73d6d4b9c9a2f0af8850ce8e5efbd915817cf9d393f80d87ed54813474d1172f", "vout":0}]'''

 

To verify it is locked:

./multichain-cli demochain listlockunspent

[

    {

        "txid" : "73d6d4b9c9a2f0af8850ce8e5efbd915817cf9d393f80d87ed54813474d1172f",

        "vout" : 0

    }

]

 

And to unlock:

./multichain-cli demochain lockunspent true

'''[{"txid":"73d6d4b9c9a2f0af8850ce8e5efbd915817cf9d393f80d87ed54813474d1172f", "vout":0}]'''

 

answered Aug 27, 2015 by MultiChain
...