-
Notifications
You must be signed in to change notification settings - Fork 55
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
Introduce cashu
to host the shared types, traits and other common code
#519
Conversation
cdk-common
to host the shared types, traits and other common code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR, it makes sense to split this up.
Just left a few comments/questions.
More generally we have the option of naming cdk_common cashu and using the cashu name space on crates.io do you think that makes more sense then cdk_common? Just a naming thing really, but as what is called cdk_common in this PR is the basics of the cashu protocol I think it makes sense.
I'll rename it to |
5f5ec1e
to
cf0f99f
Compare
cdk-common
to host the shared types, traits and other common codecashu
to host the shared types, traits and other common code
I can do this so just as a reminder to myself.
|
2a4e598
to
1b95398
Compare
Isn't that misleading? The name gives no hint that it's a commons package for the CDK. Also, nobody will be able to use it without the CDK, as the structs and utils in it are "glue" for the other logic implented in the CDK mint and wallet. For example, the IMO |
Side note: I find it curious that the PR is extracting common code, i.e. moving code or removing duplicates, and yet the diff is Maybe it makes sense to add the new things in a separate PR on top of this, and keep this exclusively about consolidating existing code into the commons crate? Would make reviews easier. What do you guys think? |
I'll remove the signatory bits now and I'll add the features flags /cc @thesimplekid |
- Created a new internal crate, `cdk-common`, to centralize shared types and trait definitions. - The goal is to enable CDK extensions without requiring CDK as a direct dependency.
Co-authored-by: thesimplekid <tsk@thesimplekid.com>
3cbad5e
to
ec3abfb
Compare
The `cashu` crates have all the types belonging to the protocol, allowing anyone to implement a compatible Cashu server if they so wish. The `cdk-common` has all the common types needed in the cdk and their sub-crates
ec3abfb
to
76755c5
Compare
053feef
to
e5f97f3
Compare
@thesimplekid this is ready for review now |
5759cb8
to
0dfb503
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updates the ci to include the new crates and some structs behind feature flags that are only needed for one of the feature.
87393f8
to
e5f2fb4
Compare
I think splitting it into cash and cdk-common addresses this concern. The I think this is similar to |
ac622d8
to
a3f8add
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 94a4c87
Description
Introduce a new crate,
cdk-common
, to host all the shared types and common functions and allow extensibility without having to include thecdk
to avoid circular dependencies.No major refactor has been done; only code has been moved to this new crate.
This will allow significant extensibility, making PRs like #509 and other similar initiatives much cleaner and easier to implement.
Suggested CHANGELOG Updates
CHANGED
Introduced
cdk-common
, a new internal crate to host all shared types, traits, and common functions to extend thecdk
without having to depend on it.ADDED
REMOVED
FIXED
Checklist
just final-check
before committing