<p>That field in the RPC response is by definition just information about the output being spent, so yes, it is always going to be equal.</p>
<p>As for whether it's necessary - no, of course not. But the RPC in the first place exists because of convenience.</p>

CC BY-SA 4.0
2021-01-01T01:10:57.033Z
2021-01-01T01:10:57.033Z
Pieter Wuille
<p>I notice that vin has a value field denoting the amount of money being spent from the input transaction. Am I correct that this is here for convenience and must equal the value of the specified transaction output?</p>
<p>The only other case I can think of is splitting the same transaction output into two transaction inputs, but I don't see the point of this.</p>
<pre><code>&quot;vin&quot;: [{
  &quot;txid&quot;:&quot;672aeb1bc62b3941f2e9a530ff6d12e5e70c257632d536d5b0633e12b68a915d&quot;,
  &quot;vout&quot;:1,
  &quot;scriptSig&quot;:{
    &quot;asm&quot;:&quot;...&quot;
  },
  &quot;addr&quot;:&quot;1HKqcNrf3NPuz4s2MdoAzpYYfjYvbbsxZf&quot;,
  &quot;value&quot;:0.0468234
},
...]
</code></pre>

<transactions>
Is the "vin" value field necessary or just a matter of convenience?
curiousgeorge
# Is the "vin" value field necessary or just a matter of convenience?

(Asked by: username_0 on 2021-01-01)

I notice that vin has a value field denoting the amount of money being spent from the input transaction. Am I correct that this is here for convenience and must equal the value of the specified transaction output?

The only other case I can think of is splitting the same transaction output into two transaction inputs, but I don't see the point of this.

```
"vin": [{
  "txid":"672aeb1bc62b3941f2e9a530ff6d12e5e70c257632d536d5b0633e12b68a915d",
  "vout":1,
  "scriptSig":{
    "asm":"..."
  },
  "addr":"1HKqcNrf3NPuz4s2MdoAzpYYfjYvbbsxZf",
  "value":0.0468234
},
...]

```

**Tags:** transactions


---

## 1 answers

### Answer by username_1 on 2021-01-01. Score: 1 | Accepted answer

That field in the RPC response is by definition just information about the output being spent, so yes, it is always going to be equal.

As for whether it's necessary - no, of course not. But the RPC in the first place exists because of convenience.


---

