adding transfer2 API that also returns the transaction id

This commit is contained in:
Daniel Larimer 2015-10-22 10:05:34 -04:00
parent 6418f819fd
commit 63c286a769

View file

@ -686,6 +686,18 @@ class wallet_api
string memo,
bool broadcast = false);
/**
* This method works just like transfer, except it always broadcasts and
* returns the transaction ID along with the signed transaction.
*/
pair<transaction_id_type,signed_transaction> transfer2(string from,
string to,
string amount,
string asset_symbol,
string memo ) {
auto trx = transfer( from, to, amount, asset_symbol, memo, true );
return std::make_pair(trx.id(),trx);
}
/** These methods are used for stealth transfers */
@ -1470,6 +1482,7 @@ FC_API( graphene::wallet::wallet_api,
(sell_asset)
(borrow_asset)
(transfer)
(transfer2)
(create_asset)
(update_asset)
(update_bitasset)