thibault-martinez / iota.lib.cpp

IOTA C++ Library
MIT License
79 stars 21 forks source link

prepareTransfer offline support #308

Closed Cylix closed 6 years ago

Cylix commented 6 years ago

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

prepareTransfers() works offline: [implementation](https://github.com/iotaledger/iota.lib.js/blob/next/packages/core/test/integration/prepareTransfers.test.ts#L46)

We need to double check, but I think we should already support offline. I had a quick overview, and seems the only time we need network in this method is if user does provided inputs and asked for an inputValidation. But maybe this validation process has been retired as well?

Cylix commented 6 years ago

We already support on our own way thanks to the validateInputs parameters. If false, we are guaranteed not to do any network calls as long as inputs are provided.

Implementation is different on the JS library as the prepareTransfer function takes as parameter an http client apparently, but the underlying logic is similar.