Ok this is a bit embarrassing but what is the standard way to pass arrays through the bitcoin debug/console window? I've done it before and I thought it just had to do with placement of quotes, but I'm having trouble doing it with scantxoutset I've tried the following:

scantxoutset start '{"desc":"addr(1SomeAddress)"}'

>>>Expected type array, got object (code -3)

scantxoutset start '["desc":"addr(1SomeAddress)"]'

>>>Error: Error parsing JSON:["desc":"addr(1SomeAddress)"]
scantxoutset start '[{"desc":"addr(1SomeAddress)}]'

>>>Error: Error parsing JSON:[{"desc":"addr(1SomeAddress)}]

scantxoutset start '["desc":"addr","1SomeAddress"]'

>>>Error: Error parsing JSON:["desc":"addr","1SomeAddress"]

scantxoutset start '["desc",{"addr","1SomeAddress"}]'

>>>Error: Error parsing JSON:["desc",{"addr","1SomeAddress"}]
  • 2
    Try '[{"desc":"addr(1SomeAddress)"}]'. – Pieter Wuille Dec 26 '20 at 18:46
  • Can't believe I didn't try that, that did it. Thx – m1xolyd1an Dec 26 '20 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.