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

KarpelesLab / libwallet / 24499799240
25%

Build:
DEFAULT BRANCH: master
Ran 16 Apr 2026 08:27AM UTC
Jobs 1
Files 82
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

16 Apr 2026 08:19AM UTC coverage: 21.247% (+0.006%) from 21.241%
24499799240

push

github

MagicalTux
fix Solana ed25519 pubkey encoding (wrong address, signatures invalid)

Symptom: Solana sends failed with
    "jsonrpc error -32002: Transaction simulation failed:
     Transaction did not pass signature verification"
and balance queries returned 0 SOL even when the address reportedly
had funds on devnet.

Root cause: at ed25519 wallet init (wallet.go:344-347) we serialized
the pubkey by writing the X coordinate big-endian:

    pubBytes := make([]byte, 32)
    edPub.X().FillBytes(pubBytes)          // wrong
    w.Pubkey = base64.RawURL(pubBytes)

Solana's ed25519 pubkey format is the 32-byte compressed Edwards
point: Y little-endian with X's sign bit in the MSB of byte 31.
base58(X-big-endian) looks like a Solana address (32 bytes fits the
encoding) but isn't the point the TSS signs with — so every send
produced a signature valid under the REAL pubkey, attached to a
transaction whose account_keys[0] was the X-coord bytes, and Solana
rejected it. Receives work for anyone who happened to fund the
displayed (wrong) address because the address space is unstructured;
sends never work.

Fix: use the already-provided
tss-lib/v2/crypto.ECPoint.ToEd25519PubKey().Serialize() which calls
edwards25519.bigIntPointToEncodedBytes(X, Y) — the spec-compliant
compressed form.

Migration for wallets created before the fix:
- wallet.subSign (ed25519 path) compares w.Pubkey to what the
  decrypted eddata.EDDSAPub serializes to; on mismatch, updates
  w.Pubkey, resaves, and emits wallet:pubkey_repaired on the env
  emitter hub.
- wltacct.InitEnv now subscribes to wallet:pubkey_repaired and
  propagates the new Pubkey to every linked Account record so the
  displayed Solana address stops being wrong too. (Also wires the
  wallet:delete and wallet:restored handlers that were previously
  declared in delete.go but never hooked up.)

New wallets: get the correct Pubkey at creation.
Existing wallets: heal on the first Solana tx signing attempt —
the same attempt that fails ups... (continued)

13 of 52 new or added lines in 3 files covered. (25.0%)

1 existing line in 1 file now uncovered.

2119 of 9973 relevant lines covered (21.25%)

2.55 hits per line

Uncovered Changes

Lines Coverage ∆ File
19
0.0
0.0% wltacct/delete.go
14
61.11
-1.2% wltwallet/wallet.go
6
0.0
0.0% wltacct/init.go

Coverage Regressions

Lines Coverage ∆ File
1
0.0
0.0% wltacct/init.go
Jobs
ID Job ID Ran Files Coverage
1 24499799240.1 16 Apr 2026 08:27AM UTC 82
21.25
GitHub Action Run
Source Files on build 24499799240
  • Tree
  • List 82
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24499799240
  • 2c8b25d9 on github
  • Prev Build on master (#24436853444)
  • Next Build on master (#24500694914)
  • 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