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

KarpelesLab / libwallet / 24375689045
25%

Build:
DEFAULT BRANCH: master
Ran 14 Apr 2026 01:27AM UTC
Jobs 1
Files 66
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

14 Apr 2026 01:19AM UTC coverage: 26.733% (-0.8%) from 27.516%
24375689045

push

github

MagicalTux
add Bitcoin HD address support (balance, xpub, nextAddress)

## Phase 4.1: BTC balance queries via modchain_assets
- New XpubProvider interface in wltnet/network.go
- bitcoinBalance() calls modchain_assets(xpub) with the account's BIP-32
  extended public key. modchain performs gap-limit scans (0..lastI+20)
  server-side across multiple script flavors and returns aggregated UTXOs.
- nativeBalance() now dispatches to bitcoinBalance for n.Type == "bitcoin"
  (previously errored with "unsupported type bitcoin").

## Phase 4.2: BTC HD address derivation
- New wltacct/xpub.go: Account.Xpub() serializes pubkey+chaincode as a
  BIP-32 extended public key via ecckd.FromPublicKey().String().
- New wltacct/btc_address.go: receive/change address derivation helpers.
  m/0/i for receive chain, m/1/i for change chain (non-hardened, since
  TSS has no private key material).
- Account.Address for bitcoin-type accounts now points to the first
  receive address (m/0/0) instead of m/0 directly.

## Phase 4.3: Address discovery API
New API endpoints (wltacct/btc_api.go):
- Account/{id}:xpub — returns the BIP-32 xpub string
- Account/{id}:nextAddress — next clean receive address via
  modchain_lookupTxoBIP32 (returns address at lastI+1)
- Account/{id}:allAddresses — listing of receive+change addresses
  scanned via modchain with activity markers

## Dart side
- AccountApi gains xpub(), nextAddress(change?), allAddresses() methods
- New models: NextAddress, HdAddress, AddressListing

## Design notes
- TSS constraint: only non-hardened derivation possible (no private keys).
  Addresses use m/0/i (not BIP-44 m/44'/0'/0'/0/i), so they're consistent
  within libwallet but not importable into seed-based wallets.
- modchain-based: all gap-limit scanning, UTXO indexing, and fee
  estimation is delegated to the modchain RPC. Client-side code only
  builds the xpub string and renders addresses.

Tests: BTC create/xpub/nextAddress all pass in FFI integration test.
Bumps Dart package... (continued)

0 of 253 new or added lines in 6 files covered. (0.0%)

1 existing line in 1 file now uncovered.

1878 of 7025 relevant lines covered (26.73%)

3.36 hits per line

Uncovered Changes

Lines Coverage ∆ File
132
0.0
wltacct/btc_api.go
46
0.0
wltacct/btc_address.go
35
48.09
-4.11% wltnet/network.go
30
0.0
wltacct/xpub.go
7
0.0
0.0% wltacct/account.go
3
0.0
0.0% wltacct/api.go

Coverage Regressions

Lines Coverage ∆ File
1
0.0
0.0% wltacct/api.go
Jobs
ID Job ID Ran Files Coverage
1 24375689045.1 14 Apr 2026 01:27AM UTC 66
26.73
GitHub Action Run
Source Files on build 24375689045
  • Tree
  • List 66
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24375689045
  • 80272333 on github
  • Prev Build on master (#24374384223)
  • Next Build on master (#24377250747)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc