-
Notifications
You must be signed in to change notification settings - Fork 0
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
DESIGN: Implement a high-level rust api #63
Comments
Related to #30 where we suggest a higher-level API for the |
I like returning deltas in an object that specifies entity and unit.
really explicit parsing of the return object makes it hard to footgun:
I like enabling user-facing functions to take either unit as input:
maybe instead of saying we have 3 action types, we could simplify to we have 2 action types (calc and execute) with the additional permutation of perspective being a choice (user or pool). this choice can be applied to any amount passed in: |
We would like to establish a high-level Rust API. I will update the current proposal here, people should feel free to comment to suggest changes. Reacts would be helpful for those who agree with any opinion expressed.
API state space
We have 8 hyperdrive actions:
We have 3 hyperdrive units:
We have 2 hyperdrive entities:
We have 3 typical actions:
Function signatures
We should establish a single convention for how to name functions.
Data structures
Output signatures could have a unified
Result
data structure that always contains every value (even if it's sometimes zero).e.g.
result.pool.share_delta
vsresult.user.base_delta
The text was updated successfully, but these errors were encountered: