`sendrawtransaction` doesn't return valid JSON
on success sendrawtransaction return the txid. But it's not formatted as JSON it's literally just the txid:
d4173e42eab51cee52af6f878567d5bbd97b394ec156a4ee62d4ef570b53f725
Which throws an error in our API wrapper library:
SyntaxError: Unexpected token d in JSON at position 0
It should be wrapped in double quotes to be parseable as JSON:
"d4173e42eab51cee52af6f878567d5bbd97b394ec156a4ee62d4ef570b53f725"
But would probably be better of formatted like the rest of the responses, something like this:
{
success: true,
txid: "d4173e42eab51cee52af6f878567d5bbd97b394ec156a4ee62d4ef570b53f725"
}
@jl777 we're trying to get a release out to the KMD community today, if there's any way you can get this fixed today that would be really helpful.
ok, i will do it right away, but you would need to add a "needjson":1 as it is the way it is for compatibility with how bitcoin does it. but if there is a needjson:1, I will wrap it in json like above
pushed needjson:1 support to dev branch
Thanks!