• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

KarpelesLab / libwallet / 24823630724
25%

Build:
DEFAULT BRANCH: master
Ran 23 Apr 2026 08:01AM UTC
Jobs 1
Files 105
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Apr 2026 07:51AM UTC coverage: 20.456% (+0.6%) from 19.832%
24823630724

push

github

MagicalTux
wltwallet: import raw private keys + BIP39 mnemonics (1-of-1, signable)

New WalletKey content schema field distinguishes TSS shares
(Schema=="") from imported raw keys (Schema=="raw") and BIP39
mnemonics (Schema=="mnemonic"). Imported wallets are 1-of-1 — no
TSS protocol involved — and signable immediately after import.

Storage:

- RawKeyShare    = {Curve, Privkey[32], Chaincode[32]}
  Used by hex / WIF imports. Chaincode is random; HD derivation
  for child accounts uses the existing non-hardened path.

- MnemonicKeyShare = {Curve, Entropy, Language, Passphrase}
  Stored as decoded entropy + the language wordlist used at
  import. Why not the raw mnemonic string: with entropy + lang
  we can re-render the mnemonic in any other BIP39 language
  for backup display. Sign reconstructs the original-language
  mnemonic before PBKDF2 because BIP39 §"From mnemonic to seed"
  feeds the literal UTF-8 mnemonic into PBKDF2 — different
  wordlists yield different seeds for the same entropy, so we
  must preserve the original language to keep the wallet's
  address stable.

Sign path:

  Wallet.Sign — early return when len(Keys)==1 and Schema is
  "raw"|"mnemonic". Dispatches to signRaw, which:
    - decrypts the share via the existing Password/StoreKey/
      RemoteKey/Plain encryption layer (RawKey/Mnemonic are
      content types; encryption is orthogonal),
    - for "mnemonic": reconstructs the original-language
      mnemonic from entropy → BIP39 PBKDF2 seed → BIP32
      (secp256k1) or SLIP-0010 (ed25519) master,
    - applies the BIP32 non-hardened child tweak when
      Account.IL is present (matches what
      ecckd.DeriveWithIL does on the public side, so the
      derived priv key matches the derived pubkey),
    - signs via crypto/ecdsa (DER) or crypto/ed25519, same
      output shape ecdsatss / eddsatss produce so callers
      (Account.Sign, eth_sign.go's wire-format converter,
      etc.) don't branch.

Endpoints:

  Wallet:importPrivateKey
    In... (continued)

166 of 411 new or added lines in 5 files covered. (40.39%)

2692 of 13160 relevant lines covered (20.46%)

58.91 hits per line

Uncovered Changes

Lines Coverage ∆ File
130
40.91
wltwallet/import.go
92
36.99
wltwallet/wallet_raw.go
23
48.52
-1.91% wltwallet/walletkey.go
Jobs
ID Job ID Ran Files Coverage
1 24823630724.1 23 Apr 2026 08:01AM UTC 105
20.46
GitHub Action Run
Source Files on build 24823630724
  • Tree
  • List 105
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24823630724
  • 899d2313 on github
  • Prev Build on master (#24822660395)
  • Next Build on master (#24823904957)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc