feat(wallet): make wallet single mint and unit #199
No reviewers
Labels
No labels
DB & Storage
Deployment
Error Handling & Logging
Maintenance
Payment Backend
backport
backport v0.13.x
backport v0.14.x
backport v0.15.x
bindings
blocked
bug
cdk-sql
ci
cli
deps
documentation
duplicate
enhancement
good first issue
help wanted
invalid
keep-open
ldk-node-ui
migrations
mint
mutation-testing
needs rebase
needs review
new nut
nut change
question
ready
rust-version
rustfmt
stacked hold
stale
testing
wallet
weekly-report
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cashubtc/cdk!199
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor_wallet_single_mint_uni"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This changes the
walletto be for a single mint and unit, simplifying the core library logic and allowing it to be more flexible for users. Multiplewalletcan be created by the user to enable multi mint and multi unit.@ -140,3 +78,1 @@.and_modify(|ps| *ps += proof.proof.amount).or_insert(proof.proof.amount);}let balance = proofs.iter().map(|p| p.proof.amount).sum::<Amount>();Is it safe to re-use the same seed for different mint URLs?
I didn't do a thorough review, but I am generally supportive of this effort to simplify. Before releasing 0.1, I think we should add a multi-mint wallet struct. That is how my wallet works right now and I imagine that will be a more common use case.
@ -140,3 +78,1 @@.and_modify(|ps| *ps += proof.proof.amount).or_insert(proof.proof.amount);}let balance = proofs.iter().map(|p| p.proof.amount).sum::<Amount>();Yes, wallets shouldn't really care about the mint_url other then how to access the mint. When generating secrets the keyset_id is used so as long as the mints have different keysets different secrets will be generated. Similarly if a mint is exposed on two endpoints the wallet should treat it has the same mint in terms of deriving secrets.
I'll add it today
@ -0,0 +1,299 @@//! MultiMint WalletI don't think
Walletneeds to be wrapped in anArcsince it is alreadyClone.