iota.lib.cpp icon indicating copy to clipboard operation
iota.lib.cpp copied to clipboard

remove sendTransfer

Open Cylix opened this issue 7 years ago • 2 comments

From #304 (iota.lib.js changes):

sendTransfer() was removed
prepareTransfers() + sendTrytes() should be used instead, with intermediate step of persisting transaction trytes. This extra step should be mentioned in docs for all methods that publish transactions (like in this case here)

I am not sure to quite understand the point of removing this helper function, would need to check how iota.lib.py or iota.lib.java are heading regarding this.

Cylix avatar Jul 11 '18 05:07 Cylix

Hi @Cylix , the reason is that we want to store the singed transaction trytes locally before broadcasting. If the request fails we don't want to sign a new bundle hash. We should use prepareTransfers() once, and broadcast as many times as needed.

chrisdukakis avatar Jul 11 '18 09:07 chrisdukakis

Thanks, @chrisdukakis (sorry for the late reply!).

Sounds reasonable, we will need to state it in the CHANGELOG once we release.

The main advantage of sendTransfer() is that it made it is less error-prone for people just getting into IOTA without removing the ability to do the steps separately for people that wish to do so. Thus, I think we would probably also need to make a dedicated entry in the documentation for people unfamiliar with the API (and actually provide something similar to sendTransfer as an example).

Thanks for keeping an eye and being reactive!

Cylix avatar Jul 24 '18 05:07 Cylix