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

KarpelesLab / libwallet / 24823904957
25%

Build:
DEFAULT BRANCH: master
Ran 23 Apr 2026 08:08AM UTC
Jobs 1
Files 106
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:58AM UTC coverage: 20.135% (-0.3%) from 20.456%
24823904957

push

github

MagicalTux
wltwallet: Wallet:promote — reshare imported share into TSS committee

The complement to importPrivateKey / importMnemonic: convert a 1-of-1
imported wallet (Schema "raw" or "mnemonic") into a normal N-of-T TSS
wallet via tss-lib's resharing protocol. The master pubkey and chaincode
are preserved — the wallet's address does NOT change — only the
storage of the signing key changes from "single share, full privkey"
to "M shares with T-threshold reconstruction".

Mechanism:

  1. Decrypt the imported share via the Old KeyDescription (typically
     the password the user set at import time). For mnemonic imports
     this also runs BIP39 PBKDF2 + BIP32/SLIP-0010 master derivation
     to recover the master privkey.

  2. Synthesize a 1-of-1 ecdsatss.Key with Xi = master privkey,
     ECDSAPub = master pubkey. NTildej / H1j / H2j / PaillierPKs are
     left nil — they're only consumed when the party will SIGN, and
     the imported share's only role here is to shard out via VSS in
     round 1.

  3. Allocate the New committee's WalletKey rows with fresh Paillier
     pre-params (the slow safe-prime generation that
     wallet.go:initializeWallet runs).

  4. Run ecdsatss.NewResharing with old=(N=1, T=0) and
     new=(N=len(New), T=Threshold). Local TssHub wires both committees
     since the imported wallet has no remote peers (it was 1-of-1).

  5. Encrypt and persist the new shares; ForceDelete the imported
     WalletKey row; bump w.Threshold to the new value. The Wallet
     row's Pubkey + Chaincode are unchanged.

Validation:

  - Wallet must be 1-of-1 imported (asserts len(Keys)==1, Schema in
    {"raw","mnemonic"}).
  - secp256k1 only in this commit; ed25519 promote (eddsatss
    equivalent) is a follow-up.
  - len(New) >= 2 and 1 <= Threshold < len(New).

Dart client (wallet_api.dart):

  client.wallets.promote(walletId,
      oldKeys: [...], newKeys: [...], threshold: 2)

Same shape as the existing wallets.reshare(...) but with explicit
Threshold... (continued)

1 of 215 new or added lines in 2 files covered. (0.47%)

2693 of 13375 relevant lines covered (20.13%)

57.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
214
0.0
wltwallet/promote.go
Jobs
ID Job ID Ran Files Coverage
1 24823904957.1 23 Apr 2026 08:08AM UTC 106
20.13
GitHub Action Run
Source Files on build 24823904957
  • Tree
  • List 106
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24823904957
  • 6947ddcb on github
  • Prev Build on master (#24823630724)
  • Next Build on master (#24824209737)
  • 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