<blockquote>
<p><strong>I guess that the script is the owner's address.I am not sure about this.</strong></p>
</blockquote>
<p>According to <a href="https://en.bitcoin.it/wiki/Script" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Script</a></p>
<blockquote>
<p>Bitcoin uses a scripting system for transactions. Forth-like, Script is simple, stack-based, and processed from left to right. It is intentionally not Turing-complete, with no loops.</p>
<p>A script is essentially a list of instructions recorded with each transaction that describe how the next person wanting to spend the Bitcoins being transferred can gain access to them.</p>
</blockquote>
<p>In your example</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Hex</th>
<th>script operation</th>
<th>Effect</th>
</tr>
</thead>
<tbody>
<tr>
<td>0x76</td>
<td>OP_DUP</td>
<td>Duplicates the top stack item</td>
</tr>
<tr>
<td>0xa9</td>
<td>OP_HASH160</td>
<td>Hashes top stack item with SHA-256 then with RIPEMD-160.</td>
</tr>
<tr>
<td>7f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a8</td>
<td>data</td>
<td>-</td>
</tr>
<tr>
<td>0x88</td>
<td>OP_EQUALVERIFY</td>
<td>Compares top two stack items</td>
</tr>
<tr>
<td>0xac</td>
<td>OP_CHECKSIG</td>
<td>Computes transaction hash and verifies signature</td>
</tr>
</tbody>
</table>
</div>
<p>See <a href="https://bitcoin.stackexchange.com/q/2251/13866">Bitcoin script example</a></p>
<p>The above is a <a href="https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_.28pay-to-pubkey-hash.29" rel="nofollow noreferrer">standard script</a> which requires the spender to prove that they own the destination address of an unspent transaction output. The data in it is a hash of a public-key. Inputs prepended to the script are a signature and public key</p>

CC BY-SA 4.0
2018-08-07T09:04:18.640Z
2022-04-07T21:27:41.167Z
2022-04-07T21:27:41.167Z
RedGrittyBrick
<p><code>tx_hash</code> and <code>tx_hash_big_endian</code> are the transaction id of the transaction that this output originated from in little endian and big endian (reversed). </p>

<p><code>tx_output_n</code> is the number of the output in the referenced transaction, i.e if a transaction has 5 outputs and you need to refer to the 5th you use a <code>tx_output_n</code> = 5.</p>

<p><code>tx_index</code> I believe is an internal unique key that blockchain.info uses to identify transactions</p>

<p><code>script</code> is the ScriptPubKey of the output, that is the conditions you need to fullfill to be able to redeem the coins.</p>

CC BY-SA 4.0
2020-01-07T05:42:56.177Z
I imagine that in building transactions we need to use `tx_hash` and not the big endian? I wish they would document stuff
ekkis
CC BY-SA 4.0
2018-08-07T08:38:55.607Z
2018-08-07T08:38:55.607Z
Mike D
<p>I am a newbie to Bitcoin.
Looking at </p>

<pre><code>curl https://blockchain.info/unspent?active=1Cdid9KFAaatwczBwBttQcwXYCpvK8h7FK
</code></pre>

<p>I guess that the script is the owner's address.I am not sure about this.</p>

<pre><code>"unspent_outputs":[

        {
            "tx_hash":"f2c245c38672a5d8fba5a5caa44dcef277a52e916a0603272f91286f2b052706",
            "tx_hash_big_endian":"0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2",
            "tx_index":47854970,
            "tx_output_n": 1,
            "script":"76a9147f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a888ac",
            "value": 8450000,
            "value_hex": "0080efd0",
            "confirmations":258278
        },
</code></pre>

<p>What do tx_hash,tx_hash_big_endian,tx_index,tx_output_n and value stand for?</p>

<hash><raw-data><output><endianness>
What are the hashes in Unspent outputs?
MikiBelavista
# What are the hashes in Unspent outputs?

(Asked by: username_0 on 2018-08-07)

I am a newbie to Bitcoin.
Looking at 
curl https://blockchain.info/unspent?active=1Cdid9KFAaatwczBwBttQcwXYCpvK8h7FK

I guess that the script is the owner's address.I am not sure about this.
"unspent_outputs":[

        {
            "tx_hash":"f2c245c38672a5d8fba5a5caa44dcef277a52e916a0603272f91286f2b052706",
            "tx_hash_big_endian":"0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2",
            "tx_index":47854970,
            "tx_output_n": 1,
            "script":"76a9147f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a888ac",
            "value": 8450000,
            "value_hex": "0080efd0",
            "confirmations":258278
        },

What do tx_hash,tx_hash_big_endian,tx_index,tx_output_n and value stand for?

**Tags:** hash, raw-data, output, endianness


---

## 2 answers

### Answer by username_2 on 2018-08-07. Score: 4 | Accepted answer

`tx_hash` and `tx_hash_big_endian` are the transaction id of the transaction that this output originated from in little endian and big endian (reversed).

`tx_output_n` is the number of the output in the referenced transaction, i.e if a transaction has 5 outputs and you need to refer to the 5th you use a `tx_output_n` = 5.

`tx_index` I believe is an internal unique key that blockchain.info uses to identify transactions

`script` is the ScriptPubKey of the output, that is the conditions you need to fullfill to be able to redeem the coins.

> **Comments:**
> **username_3**: I imagine that in building transactions we need to use `tx_hash` and not the big endian? I wish they would document stuff  

---

### Answer by username_1 on 2018-08-07. Score: 2

> **I guess that the script is the owner's address.I am not sure about this.**

According to <https://en.bitcoin.it/wiki/Script>

> Bitcoin uses a scripting system for transactions. Forth-like, Script is simple, stack-based, and processed from left to right. It is intentionally not Turing-complete, with no loops.
>
> A script is essentially a list of instructions recorded with each transaction that describe how the next person wanting to spend the Bitcoins being transferred can gain access to them.

In your example

| Hex | script operation | Effect |
| --- | --- | --- |
| 0x76 | OP\_DUP | Duplicates the top stack item |
| 0xa9 | OP\_HASH160 | Hashes top stack item with SHA-256 then with RIPEMD-160. |
| 7f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a8 | data | - |
| 0x88 | OP\_EQUALVERIFY | Compares top two stack items |
| 0xac | OP\_CHECKSIG | Computes transaction hash and verifies signature |

See [Bitcoin script example](https://bitcoin.stackexchange.com/q/2251/13866)

The above is a [standard script](https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_.28pay-to-pubkey-hash.29) which requires the spender to prove that they own the destination address of an unspent transaction output. The data in it is a hash of a public-key. Inputs prepended to the script are a signature and public key


---

