3

I'm using Bitcoin Core v0.15.1. when I use getaddressesbyaccount in the debug console I can see the "account" is DEPRECATED. in fact all methods that uses "account" mark this parameter as DEPRECATED.

I realize that the whole "Accounts" feature is being deprecated, but there is no getaddressesbylabel.

How can I replace this method to get the address by the label? what does DEPRECATED means for future versions? will the parameter be ignored or removed or will the whole getaddressesbyaccount be removed?

in fact I'm not sure how to handle other methods with "account" parameter. this label is essential to my application. (I want to lookup address by a unique label/id I will give for each user that uses my wallet).

Thanks.

3

I realize that the whole "Accounts" feature is being deprecated, but there is no getaddressesbylabel.

It looks like there actually will be a getaddressesbylabel API call in a future version. Along with a handful of other methods that replace the accounts feature. Check out this PR.

what does DEPRECATED means for future versions? will the parameter be ignored or removed or will the whole getaddressesbyaccount be removed?

When a feature is deprecated it will usually stick around for a while reporting that it will be removed in future versions of the software.

0

it's not preferred to use Accounts in any future projects.

So far you can use as an alternative getaccount and getbalance RPC call.

The getaccount RPC returns the name of the account associated with the given address.

bitcoin-cli -testnet getaccount mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN

The getbalance RPC gets the balance in decimal bitcoins across all accounts or for a particular account.

bitcoin-cli -testnet getbalance "test1" 1 true

Parameter #1—an account name

Parameter #2—the minimum number of confirmations

Parameter #3—whether to include watch-only addresses

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.