Skip to content

fix: Add HDWalletLive to CryptoLive, remove artificial native gate#373

Open
enitrat wants to merge 1 commit intoevmts:mainfrom
enitrat:fix/hdwallet-crypto-live
Open

fix: Add HDWalletLive to CryptoLive, remove artificial native gate#373
enitrat wants to merge 1 commit intoevmts:mainfrom
enitrat:fix/hdwallet-crypto-live

Conversation

@enitrat
Copy link
Contributor

@enitrat enitrat commented Feb 11, 2026

Summary

  • HDWallet is pure JS (@scure/bip32) but was incorrectly gated behind the /native entry point
  • Users were forced to use CryptoLiveNative from voltaire-effect/native for HD wallet derivation despite zero native/FFI/WASM dependency
  • The comment "HDWallet uses native FFI modules" in crypto/index.ts was simply wrong

Changes

  • Export HDWallet from voltaire-ts crypto index and wasm index (was commented out with misleading note)
  • Change HDWalletLive import from @tevm/voltaire/native to @tevm/voltaire/HDWallet
  • Add HDWalletLive to CryptoLive layer — users get HD wallet with Effect.provide(CryptoLive)
  • Export HDWalletLive from voltaire-effect/crypto/HDWallet module
  • Remove CryptoLiveNative (now redundant — was just CryptoLive + HDWalletLive)
  • Clean up misleading "native FFI" comments across native/wasm entry points

Justification

Every HDWallet function wraps @scure/bip32 — a pure JavaScript, audited BIP-32 implementation by Paul Miller. Evidence:

  • fromSeed.js:1import { HDKey } from "@scure/bip32"
  • deriveChild.js — calls key.deriveChild(index) on @scure/bip32 objects
  • No Zig FFI, no WASM, no native bindings anywhere in the HDWallet module

The /native entry point exists for genuinely native code (Keccak256 via Zig FFI). HDWallet was lumped in there by mistake, forcing users into an unnecessary import path.

Before / After

// BEFORE: Required /native entry for no reason
import { CryptoLiveNative } from 'voltaire-effect/native'
program.pipe(Effect.provide(CryptoLiveNative))

// AFTER: Just works
import { CryptoLive } from 'voltaire-effect/crypto'
program.pipe(Effect.provide(CryptoLive))

Test plan

  • All 2710 voltaire-effect tests pass (138 test files)
  • Zero new type errors (tsc --noEmit)
  • HDWallet functionality unchanged — same @scure/bip32 backing

HDWallet uses @scure/bip32 (pure JS) but was incorrectly gated behind
the /native entry point. Users were forced to use CryptoLiveNative
for HD wallet derivation despite no native/FFI/WASM dependency.

- Export HDWallet from voltaire-ts crypto/index.ts and wasm/index.ts
- Import HDWallet from @tevm/voltaire/HDWallet instead of /native in HDWalletLive
- Add HDWalletLive to CryptoLive layer
- Export HDWalletLive from HDWallet module index
- Remove CryptoLiveNative (now redundant)
- Clean up misleading "native FFI" comments
@vercel
Copy link

vercel bot commented Feb 11, 2026

@enitrat is attempting to deploy a commit to the evmts Team on Vercel.

A member of the Team first needs to authorize it.

@roninjin10
Copy link
Contributor

Hmm I'm the one who put it in native because it was causing me issues. I'll have to manually test this in myt other project before I can merge this

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.

2 participants

Comments