When a wallet owns only some inputs of a transaction, such as in CoinJoins, payjoins, or other collaborative transactions, wallet history RPCs currently apply normal send accounting.
That works when all inputs are wallet-owned, but breaks for mixed-input transactions.
Example:
Inputs:
1.00 BTC wallet-owned
2.00 BTC foreign
Outputs:
0.80 BTC wallet-owned
2.19 BTC non-wallet
The wallet can safely know:
wallet_debit = 1.00
wallet_credit = 0.80
wallet_net = -0.20
But it cannot reliably know, from wallet history alone, the foreign input value, the total fee, the wallet's fee share, or which non-wallet output should be attributed as the user's payment. This is especially important after restore, rescan, or descriptor import, where any local transaction-intent metadata may be missing.
This PR adds a conservative fallback for that no-metadata case:
- classify wallet transactions as having no wallet inputs, partial wallet inputs, or all wallet inputs
- keep existing send/fee accounting when all inputs are wallet-owned
- report partial-input transactions as category: "mixed"
- expose wallet_debit, wallet_credit, and the wallet net amount
- avoid fabricating send entries or fees when attribution is unknown
This does not try to fully solve collaborative transaction attribution. A richer layer with foreign-output / fee-share / intent metadata would still be useful for wallet-created transactions. This PR only makes the fallback honest when that metadata is unavailable.
Addresses #14136