elements
elements copied to clipboard
RawBlindRawTransaction jrpc2Errors
I'm trying to call rawblindrawtransaction
from my jrpc2.0 library.
Elementsd returns the error -8:Unknown named parameter inputamountblinders
The raw request I send is:
{"jsonrpc":"2.0","method":"rawblindrawtransaction","params":{"hexstring":"longhex...","ignoreblindfail":true,"inputamount":[100000],"inputamountblinders":["89aaaea292f84f8e2cbc0b2c4fdd0c93226fec6aeb6f9ca422bf31d62da47ada"],"inputasset":["25b251070e29ca19043cf33ccd7324e2ddab03ecc4ae0b5e77c4fc0e5cf6c95a"],"inputassetblinder":["e3880a1dc357e782987e3df8e0776f102bdb5d41b94d22263da9aae60ba0f4f5"]},"id":14}
When I remove inputamountblinders I get the error -1:JSON value is not an array as expected
Where the raw request was:
{"jsonrpc":"2.0","method":"rawblindrawtransaction","params":{"hexstring":"longhex...","ignoreblindfail":true,"inputamount":[100000],"inputasset":["25b251070e29ca19043cf33ccd7324e2ddab03ecc4ae0b5e77c4fc0e5cf6c95a"],"inputassetblinder":["9f9d2a667ebf6faa82eafe04aa9426d85b70ae366b752ea6d3449f0baacfade9"]},"id":14}
Is the serialization by the jrpc client wrong?
Have you ever succeeded in using named parameters on any other of the Elements-only RPCs? I have never done that, it might be that we don't support them yet. We should, as that's a framework thing that I think we should have inherited from upstream, but you never know.
On some other calls it seems to do fine e.g.
{"jsonrpc":"2.0","method":"generatetoaddress","params":{"address":"ert1qfkht0df45q00kzyayagw6vqhfhe8ve7z7wecm0xsrkgmyulewlzqumq3ep","nblocks":1},"id":3}
I suspect it might be that the jrpc2 library cannot handle named string arrays correctly or something like that
generatetoaddress
is not Elements-only. Did you try other blinding-related calls?
{"jsonrpc":"2.0","method":"blindrawtransaction","params":{"hexstring":"longhex.."},"id":5}
also seems to work, but it has only one single string param
Which version of Elements are you using? I'm not surprised this is broken on 0.18, but a little bit surprised about 0.21 or master.