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?
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?
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.