2

I am writing an application that uses bitcoin wallet accounts to specify what addresses belong to what user. I have been reading the documentation trying to find a way to spend Bitcoins specifying the account from, address to, and miners fee.

After reading the documentation, I think that is impossible, because there are only two ways:

  • The first one is using sendFrom, but you can't set the fee with this command. You could use settxfee but that is a changing number depending on the Kb's of the tx.

  • The second one is using CreateRawTransaction and SendRawTransaction, but in order to specify the inputs, there is no way to get the inputs, other than calling listunspent, but that returns the inputs for all wallets, and there is no way to tell that command to only return the unspent inputs for a specific account.

Is there really no way to send bitcoins from account specifying the fee?

  • Are you querying the Bitcoin core software? – Wizard Of Ozzie Aug 20 '15 at 15:20
  • @WizardOfOzzie sorry but I dont understand your question. Please post it again thanks!! – mesafria Aug 20 '15 at 17:17
2

Please don't use bitcoin cores accounting system anymore (especially for new projects). It has been deprecated (and might be removed in near future).

A way of solving your issue would be by calling getaddressesbyaccount (get addresses of a specific account) and then use listunspent with these addresses. Then you could create your own coin selection and use createrawtransaction singrawtransaction and sendrawtransaction.

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.