Skip to content

Backport: Add spent/created_txouts to SPK and Keychain TxOut indexes#2161

Open
notmandatory wants to merge 4 commits intobitcoindevkit:release/chain-0.23.xfrom
notmandatory:backport/send_recvd_txouts
Open

Backport: Add spent/created_txouts to SPK and Keychain TxOut indexes#2161
notmandatory wants to merge 4 commits intobitcoindevkit:release/chain-0.23.xfrom
notmandatory:backport/send_recvd_txouts

Conversation

@notmandatory
Copy link
Member

Description

Backport #2081 from master branch to release/chain-0.23.x.

Notes to the reviewers

This is a non-breaking change that only adds the functions and structs described below.

Changelog notice

Added

  • New spent_txouts and created_txouts methods on SpkTxOutIndex and KeychainTxOutIndex.
  • New SpentTxOut and CreatedTxOut structs returned by spent_txouts and created_txouts functions.

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

@notmandatory notmandatory self-assigned this Mar 20, 2026
@notmandatory notmandatory moved this to Needs Review in BDK Chain Mar 20, 2026
@notmandatory notmandatory added this to the Chain 0.23.3 milestone Mar 20, 2026
@notmandatory notmandatory marked this pull request as draft March 20, 2026 17:25
@notmandatory notmandatory force-pushed the backport/send_recvd_txouts branch from 0b23c50 to 5561c3f Compare March 20, 2026 18:07
@oleonardolima
Copy link
Collaborator

@notmandatory You can cherry-pick this b95e3cf, it should solve the MSRV issues.

@notmandatory notmandatory force-pushed the backport/send_recvd_txouts branch 3 times, most recently from e9464cf to fb00dd4 Compare March 20, 2026 19:05
@notmandatory
Copy link
Member Author

I rebased this whole PR on #2155 so it can be merged after that one.

@notmandatory notmandatory marked this pull request as ready for review March 20, 2026 19:16
@oleonardolima
Copy link
Collaborator

I rebased this whole PR on #2155 so it can be merged after that one.

I'd suggest to keep only b95e3cf in here, so we can merge this first and the commit that get's tagged in release is the merge of #2155, but not a blocker though.

…indexes

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.
Return tuple of (index, TxOut) in sent_and_received_txouts methods to
identify which input/output positions the TxOuts correspond to in the
original transaction.
…eychain indexes

Implement sent_txouts and created_txouts methods on SpkTxOutIndex and
KeychainTxOutIndex. These methods return new SpentTxOut and CreatedTxOut
structs allowing callers to access complete transaction information
including script pubkeys, values, and spk index.
@notmandatory notmandatory force-pushed the backport/send_recvd_txouts branch from fb00dd4 to a8fda13 Compare March 20, 2026 20:07
@notmandatory
Copy link
Member Author

I rebased this whole PR on #2155 so it can be merged after that one.

I'd suggest to keep only b95e3cf in here, so we can merge this first and the commit that get's tagged in release is the merge of #2155, but not a blocker though.

Done. Should I push a commit with the CHANGELOG changes to #2155 ?

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

Labels

module-blockchain new feature New feature or request

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

2 participants