Skip to content

Refactor: Implement type-safe Wallet factory methods and update to Kth 0.71.0#16

Merged
fpelliccioni merged 1 commit intomasterfrom
bump/kth-0.71.0
Nov 19, 2025
Merged

Refactor: Implement type-safe Wallet factory methods and update to Kth 0.71.0#16
fpelliccioni merged 1 commit intomasterfrom
bump/kth-0.71.0

Conversation

@fpelliccioni
Copy link
Copy Markdown
Contributor

Summary

This PR introduces type-safe factory methods for the Wallet class and updates the Knuth C/C++ core dependency to v0.71.0.

Changes

Wallet API Refactor (Type Safety)

  • ✅ Add Wallet.fromMnemonic() factory method for creating wallets from BIP39 mnemonics
  • ✅ Add Wallet.fromSeed() factory method for creating wallets from raw seeds
  • ✅ Make Wallet constructor private to enforce compile-time type safety
  • ✅ Prevent runtime errors when passing string instead of string[] for mnemonics

Core Dependency Update

  • ✅ Update Knuth C/C++ core from v0.70.0 to v0.71.0
  • ✅ Recompiled WASM binaries with latest core

Test Improvements

  • ✅ Update all tests to use new factory methods
  • ✅ Fix hardcoded build timestamps that would fail on user builds
  • ✅ Update version expectations to 0.71.0

Package Version

  • ✅ Bump version from 2.7.0 to 2.8.0

Migration Guide

Before:

const wallet = new Wallet(mnemonic, derivationPath, network);

After:

// For mnemonics (recommended)
const wallet = Wallet.fromMnemonic(mnemonic, derivationPath, network);

// For raw seeds (advanced usage)
const wallet = Wallet.fromSeed(seed, derivationPath, network);

Breaking Changes

⚠️ The Wallet constructor is now private. Use the factory methods instead.

Test Plan

  • All existing tests pass with new API
  • Type safety verified at compile time
  • Build timestamps no longer hardcoded

…h 0.71.0

- Add type-safe Wallet factory methods (fromMnemonic, fromSeed)
- Make Wallet constructor private to enforce type safety
- Update all tests to use new factory methods
- Fix hardcoded build timestamps in tests
- Update Knuth C/C++ core dependency from v0.70.0 to v0.71.0
- Bump package version from 2.7.0 to 2.8.0
@fpelliccioni fpelliccioni merged commit e56fac3 into master Nov 19, 2025
1 check passed
@fpelliccioni fpelliccioni deleted the bump/kth-0.71.0 branch November 19, 2025 18:53
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