thibault-martinez / iota.lib.cpp

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

iota.lib.js ongoing changes #304

Open Cylix opened 6 years ago

Cylix commented 6 years ago
Hi, I've compiled a list of most significant changes in iota.js so far + short term roadmap. I suggest to discuss new specs and build a cross platform v1 API. Current v1-alpha API is still like fresh clay, we should form it for production readiness with precise decisions.
Other than that please ping here or DM me for anything you will need.

Changes in v1.0.0-alpha: (modifié)

Changes being worked on:

Cylix commented 6 years ago

I have copy/pasted the list, we can then build a checklist of what we should do as well and split that into independent issues.

Cylix commented 6 years ago

Changes we can work on / look deeper

sendTransfer

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.

prepareTransfer

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?

getBundlesFromAddresses

Everything is kind of related here and change sounds reasonable for the performance issues.
We already tried to have some improvements for getBundlesFromAddresses, but there is not so much room for improvement as most of the performance is bound by IRI execution time.

isPromotable

Seems we have both isPromotable and checkConsistency, should we dismiss isPromotable?

getNewAddress

We already do not have checksum as it is moved to the Address model.
For returnAll, makes sense to remove it, this parameter does not bring much benefit and make API more complex.
For total, I am not sure about why removing it, probably leaving it optional should be fine as well?

wereAddressesSpentFrom

Two things here:
* For removing the export, we can move it as a private function and check with iota.lib.py and iota.lib.java about their position regarding this.
* We can look about how this function is used internally to use it as well if we don't

Bugfixes

Long term changes

Their code structure is pretty interesting with a repo split into independent modules.
We can probably do the same on our side in the future. We would then need to understand what each module is made for and what modules we can provide as well. We would also need to understand how to re-arrange our buildchain.

Things to keep an eye on

Not sure what it is about
We can try to keep an eye an possibly be consistent in the future
We can try to keep an eye an possibly be consistent in the future

Changes we can skip

We already have a similar function
Unrelated to us
Unrelated to us
Unrelated to us
We already handle that
We already handle that
Cylix commented 6 years ago

I created individual issues such that we can start working on each of them and discuss each one in a separate thread if necessary.