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

APIV2 refactoring #23

merged 19 commits into from Mar 17, 2019


None yet
1 participant
Copy link

commented Mar 15, 2019

Introducing the v2 api is demonstrating some places where the separation of concerns between crates could be much better, so taking the opportunity to do a refactoring. Will update this with a description of the new crate structure and the reasoning behind it before merging.

yeastplume added some commits Mar 15, 2019

@yeastplume yeastplume changed the title [WIP] APIV2 refactoring APIV2 refactoring Mar 17, 2019


This comment has been minimized.

Copy link
Member Author

commented Mar 17, 2019

Okay, so what's happened here is:

  • Split up the previous refwallet into 2 crates, currently called impls and controller. impls mostly contains concrete implementations of the traits found in libwallet. controller just contains logic to handle command line args and control the listener APIs. It was necessary to split these up to avoid circular dependencies in the api crate, which will need to use the types in impls to create self-testing rpc api doc tests.
  • Move the implementations of the owner and foreign APIs into libwallet. All the api layers do now is unlock/open the wallet before calling the implementations. This was needed to allow internal code to call api functions directly, again without creating circular dependencies.

@yeastplume yeastplume merged commit db01596 into mimblewimble:master Mar 17, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.