From: 志宇 Date: Wed, 15 Jun 2022 14:13:41 +0000 (+0800) Subject: Additional comments for `TransactionDetails`. X-Git-Tag: 0.20.0~16^2 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/struct.EncoderStringWriter.html?a=commitdiff_plain;h=77c7d0aae944dbd5a44ca9b8f239db0c9edcd4f8;p=bdk Additional comments for `TransactionDetails`. Describe how fields `received` and `sent` are calculated for `TransactionDetails`. --- diff --git a/src/types.rs b/src/types.rs index fc81bc27..1c376bb5 100644 --- a/src/types.rs +++ b/src/types.rs @@ -202,8 +202,10 @@ pub struct TransactionDetails { pub txid: Txid, /// Received value (sats) + /// Sum of owned outputs of this transaction. pub received: u64, /// Sent value (sats) + /// Sum of owned inputs of this transaction. pub sent: u64, /// Fee value (sats) if available. /// The availability of the fee depends on the backend. It's never `None` with an Electrum