Skip to content

feat(mint): Add Spark L2 wallet backend#1019

Open
a1denvalu3 wants to merge 25 commits into
mainfrom
feat/spark-l2-backend
Open

feat(mint): Add Spark L2 wallet backend#1019
a1denvalu3 wants to merge 25 commits into
mainfrom
feat/spark-l2-backend

Conversation

@a1denvalu3

@a1denvalu3 a1denvalu3 commented May 26, 2026

Copy link
Copy Markdown
Collaborator

A

@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 22.59615% with 161 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.49%. Comparing base (31e3ae3) to head (0219176).
⚠️ Report is 45 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
cashu/lightning/sparkl2.py 21.07% 161 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1019      +/-   ##
==========================================
- Coverage   75.03%   73.49%   -1.54%     
==========================================
  Files         111      112       +1     
  Lines       12239    12529     +290     
==========================================
+ Hits         9183     9208      +25     
- Misses       3056     3321     +265     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Comment thread cashu/lightning/sparkl2.py
Comment thread cashu/lightning/sparkl2.py Outdated
Comment on lines +98 to +101
# We run this in a thread because breez SDK connect is blocking in python (currently)
# Actually, `connect` is async in Python. Let's await it.
# wait, breez_sdk_spark python binding functions are actually async? No they are sync.
if inspect.iscoroutinefunction(breez_sdk_spark.connect):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is horrible and should be part of the codebase as well.

Comment thread cashu/lightning/sparkl2.py Outdated
)

req = breez_sdk_spark.GetInfoRequest(ensure_synced=False)
if inspect.iscoroutinefunction(self.sdk.get_info):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here. figure this out this from the documentation.

@a1denvalu3

Copy link
Copy Markdown
Collaborator Author

Thanks for the feedback! I've removed all inspect.iscoroutinefunction blocks (since they are fully supported native coroutines in the Breez python bindings) and replaced all getattr property accesses with safe, native object property dereferences after checking the variant type. Let me know if anything else catches your eye.

@a1denvalu3

Copy link
Copy Markdown
Collaborator Author

@callebtc Should we derive a mnemonic from the mint private key, or should we let it as is where the operator specifies a mnemonic for the breeze sdk as well as the secret for the mint?

Comment thread cashu/lightning/sparkl2.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants