-
Notifications
You must be signed in to change notification settings - Fork 32
Description
The appkit API is inconsistent. Transaction-related builder methods are named like "addOutputs", "addInputs", "value", "fee" etc. and take arrays while BoxOperations methods are named like "withAmountToSend", "withFeeAmount", etc. and returns a List. This results in inconsistent code and makes it necessary to convert collections.
To make it consistent I propose that we rename the BoxOperations methods to match the TX-related builder methods, and make the TX-related builder methods take lists instead of arrays.
The methods of the Address class also have a mix of "asABC" and "toABC" methods, this should be standardized as well. "toABC" is probably the best.
In addition, I suggest that we make so that the outboxbuilder tokens method allows empty collections, because having to check the size before calling it ruins the builder pattern and is very very easy to miss.