Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactoring of the TransactionFactory and Services/ApiClients #44

Closed
3 tasks done
marc0olo opened this issue Jul 21, 2019 · 5 comments
Closed
3 tasks done

refactoring of the TransactionFactory and Services/ApiClients #44

marc0olo opened this issue Jul 21, 2019 · 5 comments
Assignees

Comments

@marc0olo
Copy link
Member

marc0olo commented Jul 21, 2019

  • provide methods with predefined default values where it makes sense
    • devs shouldn't always need to provide all parameters
    • we have built a wrapper around the builder-methods but in fact we want to provide the builder for the developers
  • check @NonNull attributes of all Transaction types (e.g. payload for SpendTransaction shouldn't be required)
  • consider decode Tx-hashes into our TxModel classes #48 for the design after refactoring
@marc0olo
Copy link
Member Author

marc0olo commented Jul 21, 2019

I think we should mark the TransactionFactory deprecated and provide default values for the required fields and let the developers directly access the builder of each transaction type.

The open question then is how to perform the createInternal method for the debugApi which currently requires an initialized ApiClient for each transaction type.

  • we should return a builder where feeCalculationModel the required ApiClient is already initialized

@mitch-lbw mitch-lbw self-assigned this Jul 21, 2019
@marc0olo
Copy link
Member Author

marc0olo commented Jul 23, 2019

@mitch-lbw we should also think about a way to get access to all ApiClients with a certain configuration as this shouldn't be provided by the TransactionService.

currently we e.g. define a ChainService and an AccountService just to get access to the methods provided by the ApiClients

edit:

  • after a small discussion we decided to keep a facade to access all endpoints

@marc0olo marc0olo changed the title refactoring of the TransactionFactory refactoring of the TransactionFactory and Services/ApiClients Jul 23, 2019
@mitch-lbw
Copy link
Member

Yes - as discussed - we would not recommend to expose generated ApiClients because the underlying AE protocol is currently not stable atm. Furthermore we want provide an SDK which aims to realize a reliable API.

@marc0olo
Copy link
Member Author

please consider #48 for the design after refactoring:

maybe this can also be made more generic. a look into the python sdk might help:

@marc0olo
Copy link
Member Author

#48 won't be included in this refactoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants