Skip to content

test: add Wallet.keychains() Dart binding smoke coverage #104

Closed

Description

@Johnosezele

Description

Add a small Dart-side smoke test for the generated Wallet.keychains() binding.

This is not intended to retest wallet keychain behavior owned by bdk-ffi. The goal is only to prove the regenerated Dart binding path is callable and that List<WalletKeychain> lifts into usable Dart objects.
Wallet.keychains() came in through #101, and the current Dart test suite does not call this generated path today.

Scope

  • Call wallet.keychains() from Dart on a standard wallet.
  • Assert the returned list is non-empty.
  • Assert each returned WalletKeychain exposes a usable keychain.
  • Assert each returned WalletKeychain.publicDescriptor can be converted to a descriptor string.
  • Keep assertions thin and focused on Dart binding usability.

Activity

  1. changed the title [-]test: add Wallet.keychains() behavior coverage for standard and single-descriptor wallets[/-] [+]test: add Wallet.keychains() Dart binding smoke coverage[/+] on Jul 6, 2026
  2. j-kon commented on Jul 7, 2026

    @j-kon
    Contributor

    Hi, I’d like to work on this if it’s available.

    My plan for the PR would be to keep the change very small and focused on Dart binding smoke coverage only.

    Proposed approach:

    • Add one deterministic offline test for Wallet.keychains().
    • Reuse the existing wallet test/helper patterns where possible.
    • Create a standard test wallet.
    • Call wallet.keychains() from Dart.
    • Assert the returned list is not empty.
    • Assert each WalletKeychain exposes a usable keychain.
    • Assert each WalletKeychain.publicDescriptor can be converted to a descriptor string.
    • Keep the assertions thin so the test only checks generated Dart binding usability.
    • Avoid retesting wallet keychain behavior that belongs in bdk-ffi.
    • Avoid any Electrum, Esplora, sync, full-scan, regtest, or network work.

    Validation I would run before opening the PR:

    • dart format --output=none --set-exit-if-changed lib test example
    • dart analyze --fatal-infos --fatal-warnings lib test example
    • dart test

    If this plan sounds good, please assign this issue to me.

  3. Johnosezele commented on Jul 7, 2026

    @Johnosezele
    ContributorAuthor

    Go ahead @j-kon, I would like to see these covered:

    Call wallet.keychains() from Dart on a standard wallet.
    Assert the returned list is non-empty.
    Assert each returned WalletKeychain exposes a usable keychain.
    Assert each returned WalletKeychain.publicDescriptor can be converted to a descriptor string.
    Keep assertions thin and focused on Dart binding usability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomerstestingadd tests coverage for uncovered areas in the library

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions