bdk icon indicating copy to clipboard operation
bdk copied to clipboard

Add sent_and_received_txouts methods to SPK and Keychain TxOut indexes

Open notmandatory opened this issue 1 month ago • 0 comments

Description

Implement sent_and_received_txouts methods on SpkTxOutIndex and KeychainTxOutIndex. These methods return actual TxOut structs allowing callers to access complete transaction output information including script pubkeys and values.

Notes to the reviewers

This info is useful to users who use the new WalletEvent data in bitcoindevkit/bdk_wallet#319. In particular to determine the addresses and amounts for TxOuts that are sent/spent or have been received in a newly seen or confirmed transaction. See: bdk_wallet#319 comment

If/when this PR is merged I'll make a corresponding one to add a Wallet::sent_and_received_txouts method.

Changelog notice

Added

  • New sent_and_received_txouts methods on SpkTxOutIndex and KeychainTxOutIndex.

Checklists

All Submissions:

New Features:

  • [x] I've added tests for the new feature
  • [x] I've added docs for the new feature

notmandatory avatar Dec 10 '25 22:12 notmandatory