Skip to content

wallet: Add listrawtransactions RPC#35813

Open
pablomartin4btc wants to merge 2 commits into
bitcoin:masterfrom
pablomartin4btc:wallet/listrawtransactions
Open

wallet: Add listrawtransactions RPC#35813
pablomartin4btc wants to merge 2 commits into
bitcoin:masterfrom
pablomartin4btc:wallet/listrawtransactions

Conversation

@pablomartin4btc

Copy link
Copy Markdown
Member

Add a new listrawtransactions RPC that returns wallet transactions without logical interpretation. Unlike listtransactions, which only lists transactions with an economic category (sends to external addresses, receives from outside), this RPC returns every transaction the wallet knows about — including consolidations and self-transfers that would otherwise be invisible.

Each transaction appears exactly once with its net wallet balance change (amount) and, when the wallet funded the transaction, the fee paid (fee). Pagination is supported via count and skip parameters, matching the interface of listtransactions.

Next possible follow-ups:

  • A filter parameter ("all" / "received" / "sent" / "self") once per-tx semantics are agreed on
  • Some fields inherited from TransactionDescriptionString() carry references to category (e.g. replaced_by_txid, parent_descs) which don't apply here — could be cleaned up in a separate pass

Closes #34632.

Previous attempt: #35009 (by alfonsoromanz), closed in favour of a separate RPC as suggested by achow101.

@DrahtBot

DrahtBot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35813.

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

pablomartin4btc added a commit to pablomartin4btc/bitcoin that referenced this pull request Jul 26, 2026
@DrahtBot

Copy link
Copy Markdown
Contributor

🚧 At least one of the CI tasks failed.
Task lint: https://github.com/bitcoin/bitcoin/actions/runs/30211957111/job/89819583780
LLM reason (✨ experimental): CI failed because the lint test lint-files.py reported an executable-permission mismatch: test/functional/wallet_listrawtransactions.py has shebang but mode 644 instead of required 755.

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

Add a new `listrawtransactions` RPC that returns wallet transactions
without logical interpretation. Unlike `listtransactions`, which only
lists transactions with an economic category (sends to external
addresses, receives from outside), this RPC returns every transaction
the wallet knows about — including consolidations and self-transfers
that would otherwise be invisible.

Each transaction appears exactly once with its net wallet balance
change (`amount`) and, when the wallet funded the transaction, the fee
paid (`fee`). Pagination is supported via `count` and `skip` parameters,
matching the interface of `listtransactions`.
@pablomartin4btc
pablomartin4btc force-pushed the wallet/listrawtransactions branch from 2ca8449 to 1555198 Compare July 26, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

listtransactions does not list tx that spends only change outputs to a change address

2 participants