adding transfer2 API that also returns the transaction id
This commit is contained in:
parent
6418f819fd
commit
63c286a769
1 changed files with 13 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue