0

sendtoaddress is using the "" account by default. Is it possible to make it use any other account name?

  • 5
    You want sendfrom, but the whole account feature is deprecated so you should redesign your application to not use it at all. – Nate Eldredge Feb 8 '18 at 19:29
1

Accounts are deprecated and labels are the alternative for accounts.

I'd recommend using latest Bitcoin 0.17.0 which has multi wallet features which can isolate each user, further read:

https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Multi-wallet_RPC_calls

https://github.com/bitcoin/bitcoin/pull/13058

0

sendtoaddress Doesn't support accounts at all

Parameter #1—to address
Parameter #2—amount to spend
Parameter #3—a comment
Parameter #4—a comment about who the payment was sent to
Result—a TXID of the sent transaction

What you can do as alternative is getaccountaddress to get bitcoin address of an account and then sendtoaddress

  • actually i want to pick the source account..not the destination. By default sendtoaddress picks the "" account as source. Is it possible to pick any other account? – lambogambo Feb 9 '18 at 5:10
  • Yes, put account name instead of "", like that "myaccount" – Adam Feb 9 '18 at 13:33
-1

First do move command to move bitcoins from custom account to "", for example

bitcoin-cli move "account_with_bitcoins" "" amount_to_send

And then use sendtoaddress

bitcoin-cli sendtoaddress "address" amount_to_send

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.