Bitcoin-cli -regtest getaccount, listaccounts, setaccount, method not found I just setup bitcoind (0.18.1) and put it in regtest mode, I am trying to work with accounts, but the account commands are not found...

setaccount

 jlroberts@mixerregtest:~$ bitcoin-cli -regtest setaccount 2NDCk4d7BYGztagf812gUdWqqPSMymdH4rS one
 error code: -32601
 error message:
 Method not found


getaccount

jlroberts@mixerregtest:~$ bitcoin-cli -regtest getaccount one
error code: -32601
error message:
Method not found


listaccounts

jlroberts@mixerregtest:~$ bitcoin-cli -regtest listaccounts
error code: -32601
error message:
Method not found


getblockchaininfo

{
  "chain": "regtest",
  "blocks": 303,
  "headers": 303,
  "bestblockhash": "77d7169d013574a1254ccf472389b40c3393f41498ddc6f84b8d078c740d3da3",
  "difficulty": 4.656542373906925e-10,
  "mediantime": 1568636861,
  "verificationprogress": 1,
  "initialblockdownload": false,
  "chainwork": "0000000000000000000000000000000000000000000000000000000000000260",
  "size_on_disk": 92175,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": false
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "locked_in",
      "startTime": 0,
      "timeout": 9223372036854775807,
      "since": 288
    },
    "segwit": {
      "status": "active",
      "startTime": -1,
      "timeout": 9223372036854775807,
      "since": 0
    }
  },
  "warnings": ""
}


What could I be doing wrong?
accounts method was deprecated in v0.17 and was removed since v0.18. accounts was replaced by label and it provides more flexibility as compared to before such as setting label on any address, not just receiving address. It also irons out issues raised in the past. If you are used to using accounts to mimic separate wallets, you now have an option to use separate wallets in separate wallet files in Bitcoin Core.

So according to the commands you are looking, you will replace them by:


getaccount with getaddressinfo
listaccounts with listlabels
setaccount with setlabel


You can see the full documentation of accounts vs labels in the v0.17 release docs.