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

Refactor packages #79

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

andrewl33
Copy link

@andrewl33 andrewl33 commented Jul 28, 2024

Description

This is purely a refactor. There are no logic changes.

The comments and changelogs are probably not up-to-date any longer. 😬

There was a problem with circular dependencies at some point during the creation of this repo.
I believe this solves that problem, by layering the codebase like this:

Screenshot 2024-07-27 201915

The pattern for users will be to use mostly types, api and client.

Other improvements?

I don't know the codebase well enough to understand how reasonable these recommendations are.

  • rename types and client to aptostypes and aptosclient. They'll probably clash codebases that import this sdk.
  • Put client-only types in the client library. Merge api and client.
  • Make a constants package? For 0x1... etc.
  • Based on usage, users will probably care about 3 distinct things, Account management, transaction creation, and interacting with the node. Maybe that should guide further package shuffles.

Test Plan

The multiple main_test.go still build. I added ./scripts/build-tests.sh to verify.

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

Successfully merging this pull request may close these issues.

1 participant