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

NUT13-only Wallet with provided seed #127

Merged
merged 4 commits into from
May 15, 2024

Conversation

davidcaseria
Copy link
Contributor

@davidcaseria davidcaseria commented May 13, 2024

The Wallet will now only support NUT -13-based secret derivation. The cdk user must provide a seed, which is used to generate an internal Xpriv.

Also, the database counter is changed to a u32 since the maximum value is 2^31-1.

Closes #111
Closes #125
Relies on #126

@thesimplekid thesimplekid added this to the V0.1.0 milestone May 13, 2024
@thesimplekid
Copy link
Collaborator

thesimplekid commented May 14, 2024

@davidcaseria Mind just rebaseing on main and squashing the commits? I can do it if not just let me know

Copy link
Collaborator

@thesimplekid thesimplekid left a comment

Choose a reason for hiding this comment

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

Thanks for the PR looks good. Think just remove the feature and good to go

crates/cdk/src/wallet.rs Outdated Show resolved Hide resolved
crates/cdk/src/wallet.rs Outdated Show resolved Hide resolved
crates/cdk/src/wallet.rs Outdated Show resolved Hide resolved
crates/cdk/src/wallet.rs Outdated Show resolved Hide resolved
@davidcaseria
Copy link
Contributor Author

I simplified your suggestion to a one-liner: let count = count.map_or(0, |c| c + 1);. I think that's still pretty clear if you know what the map_or function does, but let me know if you'd like me to change it to your suggestion.

@thesimplekid
Copy link
Collaborator

I simplified your suggestion to a one-liner: let count = count.map_or(0, |c| c + 1);

Even better thanks

@thesimplekid thesimplekid merged commit 188cfa6 into cashubtc:main May 15, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wallet: Support only nut13 deterministic wallets Use Xpriv in Wallet
2 participants