<p>A transaction has inputs and outputs. When an input is from script address, the validator script is run to allow or disallow spending the UTxO protected by it in that transaction. While deciding whether to allow or disallow, it can see the whole transaction with its inputs and outputs. Let's say that one of the outputs is <code>o :: TxOut</code>. You can use <code>txOutValue o</code> to get the value (of type <code>Value</code>) of that output.</p>
<p>I'm not aware of <code>txInInput</code>. The closest I can think about is <code>txInputs</code> which is the set of inputs to the transaction being validated. Similarly, <code>txOutputs</code> is the set of outputs.</p>

CC BY-SA 4.0
2022-01-07T18:40:46.283Z
2022-01-07T18:40:46.283Z
ijkl26
<p>What is the txOutValue in reference to in a validator script? Is it the output value sent to the script by a wallet or is it the value sent by the script after compilation?</p>
<p>Also what does the txInInput refer to?</p>

CC BY-SA 4.0
2022-01-07T04:20:26.060Z
Can I see what yu were reading?
Louis Waweru
<plutus><smart-contract><transaction><plutus-pioneer-program>
What does the txOutValue refer to?
# What does the txOutValue refer to?

(Asked by: username_0 on 2022-01-04)

What is the txOutValue in reference to in a validator script? Is it the output value sent to the script by a wallet or is it the value sent by the script after compilation?

Also what does the txInInput refer to?

**Tags:** plutus, smart-contract, transaction, plutus-pioneer-program
> **Comments:**
> **username_1**: Can I see what yu were reading?  

---

## 1 answers

### Answer by username_2 on 2022-01-07. Score: 3

A transaction has inputs and outputs. When an input is from script address, the validator script is run to allow or disallow spending the UTxO protected by it in that transaction. While deciding whether to allow or disallow, it can see the whole transaction with its inputs and outputs. Let's say that one of the outputs is `o :: TxOut`. You can use `txOutValue o` to get the value (of type `Value`) of that output.

I'm not aware of `txInInput`. The closest I can think about is `txInputs` which is the set of inputs to the transaction being validated. Similarly, `txOutputs` is the set of outputs.


---

