getTransaction abstract method

Future<BitcoinTransaction?> getTransaction(
  1. String txid, {
  2. String? walletId,
})

Get a specific transaction by ID.

Transactions are stored per wallet (audit 2026-09-14 S-05): when wallet A pays wallet B in the same store, each wallet has its own row for the txid with its own netAmount, direction and status.

Parameters:

  • txid: Transaction ID to retrieve
  • walletId: the wallet whose row to return. Pass it whenever the wallet-specific fields matter. When null, the row of the wallet that stored the txid first is returned; its wallet-independent fields (rawHex, fee, input/output values) are the same for every wallet.

Returns: Transaction if found, null if not found

Implementation

Future<BitcoinTransaction?> getTransaction(String txid, {String? walletId});