What are we supposed to use for a TXID for unconfirmed transaction?
Specifically, the transfer API call doesn't seem to return anything obvious?
The transfer API returns the signed_transaction in JSON form. Converting it to binary and hashing it will give you a transaction ID.
Alternatively you can use the witness_node API to broadcast the transaction:
/** this version of broadcast transaction registers a callback method that will be called when the transaction is
* included into a block. The callback method includes the transaction id, block number, and transaction number in the
* block.
*/
void broadcast_transaction_with_callback( confirmation_callback cb, const signed_transaction& trx);
In this case you will get a callback via websocket when the transaction has been included in a block. The callback includes the transaction id, block number, and the trx # in the block.