Closed zerotobtc closed 2 years ago
You're correct. It looks like the first parameter was dropped at some point, so just including the address-type is now right.
Turns out the problem was a discrepancy between getnewaddress
and the newer getrawchangeaddress
. The first takes an extra argument for label, and the second. It's been resolved & tested. Thank you!
Hello folks,
I'm currently inthe interlude about using curl. But I can't get the legacy address. I entered
""
and"legacy"
as parameters like this:curl --user StandUp --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawchangeaddress", "params": ["", "legacy"] }' -H 'content-type: text/plain;' http://127.0.0.1:18332/ | jq -r '.'
but I get the following error:
However, if I try it with only
""
as argument it fails. Using only"legacy"
seems to give me the right address type ("mfzDenj..."), running it without any arguments seems to give me the fallback to Bech32 ("tb1...").But in the repo it says that using ONLY
"legacy"
would give me back a Bech32 ??Thanks for help in advance!