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

Split the Client API in two #146

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Split the Client API in two #146

wants to merge 2 commits into from

Conversation

kegsay
Copy link
Member

@kegsay kegsay commented Sep 30, 2024

We want the Client API to be as small as possible, to make it as easy as possible to implement clients which can work with complement-crypto.

However, we also want to use that same API when writing tests, where it is desirable to have helper functions (typically of the form MustXXX).

To satisfy both, split the API in two, where the SDK authors implement the simple Client and the test suite then wraps that in another API called TestClient which handles all the nice helper functions.

For now, just convert MustStartSyncing to illustrate the design change. Next PR will move the remaining Must functions.

We want the Client API to be as small as possible, to make it as easy
as possible to implement clients which can work with complement-crypto.

However, we also want to use that same API when writing tests, where
it is desirable to have helper functions (typically of the form `MustXXX`).

To satisfy both, split the API in two, where the SDK authors implement
the simple `Client` and the test suite then wraps that in another API
called `TestClient` which handles all the nice helper functions.

For now, just convert `MustStartSyncing` to illustrate the design change.
Next PR will move the remaining Must functions.
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.

2 participants