Does the SendFrom RPC support assets?

0 votes
Given that the API does not currently support the sending of assets from a designated address, I'm wondering if the SendFrom bitcoin RPC can be used to send assets instead.

Although I appreciate that accounts are to be deprecated at some stage in the future, as an intermediate workaround I'm wondering if I could create an account per address and use the SendFrom RPC to send assets, specifying the account name when calling the method. Used in conjunction with the getassetbalances RPC, this would also solve the question of asset balances by address.

Of course, this would only work if the change from the transaction were sent to an address in the account that send the assets in the first place.

So I guess that the question is twofold: can we use sendfrom with assets and does/can the change go to an address in the same account?
related to an answer for: Wallet Segregation
asked Sep 30, 2015 by PeteC

2 Answers

0 votes

Unfortunately sendfrom (which we inherited from Bitcoin Core) does not work in this way, and this is part of the reason why the whole accounts system is being deprecated. It sends from any UTXO in the wallet, and simply makes a deduction in the wallet's internal records regarding which "account" was used.

The change address is complicated, because a transaction might spend funds from more than one address, but I guess that question's not relevant since sendfrom can't do what you need.

answered Sep 30, 2015 by MultiChain
Shame - I thought that might be a viable work-around in the short term. Thanks for looking into it though
Yep, for now you're stuck with listunspent + createrawtransaction, or waiting for the next alpha.
Judging by the apparent complexity of sorting assets from permissions in listunspent I think I'll wait until the next Alpha and take a look at the new functionality
0 votes
Just an update that MultiChain 1.0 alpha 8 was just released with a bunch of new APIs for isolating operations relating to individual addresses in the wallet.
answered Oct 14, 2015 by MultiChain
Great news! Excuse me whilst I go take a peek!