-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
verifyaddress returns a poorly-formatted JSON response in v2. #226
Comments
jowenshaw
pushed a commit
to jowenshaw/metaverse
that referenced
this issue
Jan 10, 2018
jowenshaw
pushed a commit
to jowenshaw/metaverse
that referenced
this issue
Jan 12, 2018
jowenshaw
pushed a commit
to jowenshaw/metaverse
that referenced
this issue
Jan 15, 2018
jowenshaw
pushed a commit
to jowenshaw/metaverse
that referenced
this issue
Jan 15, 2018
fix issue mvs-org#226 and modify README
NotoriousPyro
changed the title
verifyaddress returns a poorly JSON-formatted response
verifyaddress returns a poorly-formatted JSON response in v2.
Jan 23, 2018
This was referenced Jan 23, 2018
fixed, now the response for invalid address is: {
"id" : 1,
"jsonrpc" : "2.0",
"result" :
{
"address-type" : "none",
"is-valid" : false,
"message" : "invalid address!",
"test-net" : true
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you query a valid address:
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"validateaddress","params":["MBH5mtwPvNFqMqb6S9HN5hNCG5Wbu8WaCb"],"id":1}' http://127.0.0.1:8820/rpc/v2
You get the expected:
Which is useful for when you're creating a struct like so:
However, the struct becomes somewhat useless because of the response when you query an invalid address (as it doesn't just switch is-valid to false...):
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"validateaddress","params":["MBH5mtwPvNFqMqb6S9HN5hNCG5Wbu8WaCc"],"id":1}' http://127.0.0.1:8820/rpc/v2
The text was updated successfully, but these errors were encountered: