bitsign icon indicating copy to clipboard operation
bitsign copied to clipboard

output would be nice in json

Open instagibbs opened this issue 6 years ago • 6 comments

:)

instagibbs avatar Oct 16 '19 19:10 instagibbs

Like this? or something else?

{
"adress": "bc1q64mh4n7u9xxvfdsml3pasr4tsn85dewnsfexuf",
"privkey": "KxUeV889U8Zxfzf2qCSVFBTkZZQMVXodUJDutT7pBf4XdjcEds7p"
}

elichai avatar Oct 17 '19 15:10 elichai

Well, spelling "address" right is preferable but yes anything that jq can parse is great for bash type usage

instagibbs avatar Oct 17 '19 15:10 instagibbs

lol, sorry. ok. i'll add --json to all the commands and test that jq parse them correctly :)

elichai avatar Oct 17 '19 15:10 elichai

yay

instagibbs avatar Oct 17 '19 15:10 instagibbs

should It return a json even if the base64 isn't valid or something like that? or at that point it's fine to have a regular error? (the exit value is 1 in that case, so you can still check for that in bash)

elichai avatar Oct 17 '19 16:10 elichai

Feel free to test current master, should do the job for best case scenarios but won't return json's on weird errors. if you want 100% jsons always that will require a bit more effort :)

(i'll publish a new version when it's done)

elichai avatar Oct 17 '19 16:10 elichai