Skip to content

feat(wallet): upgrade cashu-ts to v3#370

Open
pablof7z wants to merge 3 commits intomasterfrom
feature/cashu-ts-v3
Open

feat(wallet): upgrade cashu-ts to v3#370
pablof7z wants to merge 3 commits intomasterfrom
feature/cashu-ts-v3

Conversation

@pablof7z
Copy link
Collaborator

Summary

  • Upgrade @cashu/cashu-ts from v2.1 to v3.1
  • Update all class references: CashuWalletWallet, CashuMintMint
  • Migrate to new method names: createMintQuoteBolt11, createMeltQuoteBolt11, meltProofsBolt11
  • Move P2PK handling from SendConfig to OutputConfig parameter
  • Fix keyset access pattern using wallet.keyChain.getCache()

Test plan

  • Build succeeds (JS, CJS, DTS)
  • Tests pass (46 pass, matches baseline)
  • Manual testing with actual mint

- Update @cashu/cashu-ts from ^2.1 to ^3.1
- Rename CashuWallet → Wallet, CashuMint → Mint
- Rename methods: createMintQuote → createMintQuoteBolt11,
  createMeltQuote → createMeltQuoteBolt11, meltProofs → meltProofsBolt11
- Fix static method: CashuMint.getInfo() → new Mint().getInfo()
- Fix keyset access: wallet.keys → wallet.keyChain.getCache()
- Move P2PK handling from SendConfig to OutputConfig parameter
- Move custom denominations to OutputConfig
Copy link
Collaborator Author

@pablof7z pablof7z left a comment

Choose a reason for hiding this comment

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

Code Review: cashu-ts v3 upgrade

The migration looks correct — class renames (CashuWallet→Wallet, CashuMint→Mint), method name updates, P2PK handling moved to OutputConfig, keyset access via wallet.keyChain.getCache().

However, this PR currently has merge conflicts with master (likely from version bumps and bun.lock changes since December). Given this is a 43-file change touching all package.json versions plus wallet internals, it will need a careful rebase.

@pablof7z This needs a rebase on current master to resolve the version/lockfile conflicts. The wallet code changes themselves look good.

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.

1 participant