Closed RESTfulRaccoon closed 1 year ago
Error acts as if perams is empty "perams": [""]
returns same error
method mintspark
returns same error
seems anything requiring parameters returns the error
{"result":null,"error":{"code":-1,"message":"JSON value is not an object as expected"},"id":"something"}
Please try with latest commit from spark branch (daemon only, Qt does not have Spark UI.) Let me know if you need the binaries.
same error, but to be honest I'm not the best with git so could be on my end.
It seems to be the parser and not an server issue.
Three examples:
spendspark
to a single address - success
spendspark
to signle address - fail. Note the [
and ]
as only difference to before.
spendspark
to multiple address - success | lining up the params without squared brackets
I agree that one example in the help is with square brackets. So question to Project is whether it is a documentation issue or parser issue.
@RESTfulRaccoon would you mind to run a retest without square brackets and confirm observation?
here the param templates :
spendspark "{\"ADDRESS1\":{\"amount\":1,\"memo\":\"\", \"subtractFee\": false}}" spendspark ["{\"ADDRESS1\":{\"amount\":1,\"memo\":\"\", \"subtractFee\": false}}"] spendspark "{\"ADDRESS1\":{\"amount\":1, \"memo\":\"test_memo\", \"subtractFee\": false},\"ADDRESS2\":{\"amount\":1, \"subtractFee\": false}}"
apologies. I checked the code and now below the curl
commands:
amend username, address and port accordingly.
single:
curl -v --user MYUSERNAME --data-binary '{"jsonrpc": "1.0", "id":"something", "method": "spendspark", "params": [{"ADDRESS1":{"amount":0.01, "subtractFee": false}}] }' -H 'content-type: text/plain;' http://127.0.0.1:PORT/
multiple:
curl -v --user MYUSERNAME --data-binary '{"jsonrpc": "1.0", "id":"something", "method": "spendspark", "params": [{"ADDRESS1":{"amount":0.01, "subtractFee": false},"ADDRESS2":{"amount":0.01, "subtractFee": false}}] }' -H 'content-type: text/plain;' http://127.0.0.1:PORT/
proof:
single - returns 200
multiple - return 200
seems to be rather a documentation issue to me, than a functional one. Valid though.
Fixed with 881ff260d3b459d8b2e6eaa5c089eec35c385d47 , Feel free to reopen, in case issue again happens.
Please reply to this post with a mainnet Firo address for the bug bounty payout. Use a new address that has never been used before. Make sure to anonymize after receiving!
a3BacgFxzAgkG1dSBYLyi5r3s5rbU3nXVi
TXID: 0c73d47b082b69d584c2719951eea64b859f432ac92a35d711bb96503afc64e2
Bounty paid: Type: UI Amount: 5 Firo
Describe the issue
Returns:
./firo-cli "{\"$ADDR\":{\"amount\":1, \"memo\":\"\", \"subtractFee\": false}}"
work as expected, no wallet encryption
Other curl methods such as: "getnewsparkaddress" and "getinfo" and "getsparkbalance" work as expected
Local setup
Manjaro - Linux 6.4 Firo 14.12.04
Any extra information that might be useful in the debugging process.
Using an invalid address causes the same error No relevant logs available