<p>The OP_RETURN in output=0 (1st position), we have the hex data <code>4f41010002016f06753d32322631</code> which decodes to <code>OA\x01\x00\x02\x01o\x06u=22&amp;1</code> in Python, which seems right, since OA precedes open assets hex data.</p>

<p>The data for <em>asset id</em> is in that hex code. Everything is. The other inputs are inconsequential. </p>

<p>The reason the other outputs use 600 satoshis (฿ 0.00000600) is because it's just above the dust threshold. You can't send an OP_RETURN without valid outputs, or priority. The large balance (~฿49) is so the transactions get sufficient priority to be processed. </p>

<p>Going off <a href="https://en.bitcoin.it/wiki/Colored_Coins#Open_Assets" rel="nofollow">Colored Coins @ BTC Wiki</a>:</p>

<pre><code>&gt; Data in the marker output      Description
&gt; -----------------------------  -------------------------------------------------------------------
&gt;  0x6a                           The OP_RETURN opcode.
&gt;  0x10                           The marker output is 16 bytes long.
&gt;  0x4f 0x41                      The Open Assets Protocol tag.
&gt;  0x01 0x00                      Version 1 of the protocol.
&gt;  0x03                           There are 3 items in the asset quantity list.
&gt;  0xac 0x02 0x00 0xe5 0x8e 0x26  The asset quantity list:
&gt;                                 - '0xac 0x02' means output 0 has an asset quantity of 300.
&gt;                                 - Output 1 is skipped and has an asset quantity of 0 because it is the marker output.
&gt;                                 - '0x00' means output 2 has an asset quantity of 0.
&gt;                                 - '0xe5 0x8e 0x26' means output 3 has an asset quantity of 624,485.
&gt;                                 - Outputs after output 3 (if any) have an asset quantity of 0.
&gt;  0x04                           The metadata is 4 bytes long.
&gt;  0x12 0x34 0x56 0x78            Some arbitrary metadata.
</code></pre>

<p>I don't see an <em>asset_id</em> parameter, so perhaps you can clarify that point. Are you sure it's <em>Colored Coins</em>? (ie could it be a specific implementation like <a href="http://coinspark.org/" rel="nofollow">CoinSpark</a>?)</p>

CC BY-SA 3.0
2015-04-26T02:31:29.253Z
Is there a way to calculate the **asset_id** in this transaction?
moshaholo
CC BY-SA 3.0
2015-04-29T10:57:32.400Z
see my edit mate
Wizard Of Ozzie
CC BY-SA 3.0
2015-04-29T11:06:35.247Z
EDIT: Found it! I just need some time to decipher the *openassets* code; https://github.com/OpenAssets/openassets/blob/9c90521e40f549ac13e783a3bbcd639ad12bb587/openassets/protocol.py#L81, perhaps @nickodell or someone who has a minute that's good with Python can help
Wizard Of Ozzie
CC BY-SA 3.0
2015-04-25T10:14:57.220Z
2015-04-29T11:04:29.480Z
2015-04-29T11:04:29.480Z
Wizard Of Ozzie
<p>In order to complete a transaction, some parameters should be provided.<br></p>

<p>Such as transfer_quantity (provided in OP_RETURN), destination_address (provided in vout.scriptPubKey) <br>
I am wondering where <b>asset_id</b> is in this raw transaction. <br></p>

<pre><code>{
    "hex" : "0100000002c980feda53fd0e5fcd8328db01234543385e48ac16864e22a0169322912f4fd7020000006a47304402203693f5f888d340d6bc1f08e9e62bb819fd3f03d47f69e8c6fc16fd6beb289dfc02205f792edacf2e08017d0e08ecd779c8440cba5f780b5c9e5fa44fbfd9f7904211012103108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07ffffffffc980feda53fd0e5fcd8328db01234543385e48ac16864e22a0169322912f4fd7030000006b4830450221009e2a2c4136bb7527ec04eedb253e6e8c1b5e693e9ebd6411df96e5376630fd5002205eba1253da8fe1e7bac2a8d827d3a033476907ccf8819e70bbd5927dcfafd750012103108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07ffffffff040000000000000000106a0e4f41010002016f06753d3232263158020000000000001976a9144f01b233dfae8ed822146e84f8ea20d6e488ca9288ac58020000000000001976a914022ebb12c302459a5273161b992f7ee37b3c9ba388ac206ab429010000001976a914022ebb12c302459a5273161b992f7ee37b3c9ba388ac00000000",
    "txid" : "92fa631b034a9dbdab8bbd67b1d438242e84549de3a0c7852c917356db0da42b",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "d74f2f91229316a0224e8616ac485e3843452301db2883cd5f0efd53dafe80c9",
            "vout" : 2,
            "scriptSig" : {
                "asm" : "304402203693f5f888d340d6bc1f08e9e62bb819fd3f03d47f69e8c6fc16fd6beb289dfc02205f792edacf2e08017d0e08ecd779c8440cba5f780b5c9e5fa44fbfd9f790421101 03108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07",
                "hex" : "47304402203693f5f888d340d6bc1f08e9e62bb819fd3f03d47f69e8c6fc16fd6beb289dfc02205f792edacf2e08017d0e08ecd779c8440cba5f780b5c9e5fa44fbfd9f7904211012103108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07"
            },
            "sequence" : 4294967295
        },
        {
            "txid" : "d74f2f91229316a0224e8616ac485e3843452301db2883cd5f0efd53dafe80c9",
            "vout" : 3,
            "scriptSig" : {
                "asm" : "30450221009e2a2c4136bb7527ec04eedb253e6e8c1b5e693e9ebd6411df96e5376630fd5002205eba1253da8fe1e7bac2a8d827d3a033476907ccf8819e70bbd5927dcfafd75001 03108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07",
                "hex" : "4830450221009e2a2c4136bb7527ec04eedb253e6e8c1b5e693e9ebd6411df96e5376630fd5002205eba1253da8fe1e7bac2a8d827d3a033476907ccf8819e70bbd5927dcfafd750012103108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 0.00000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_RETURN 4f41010002016f06753d32322631",
                "hex" : "6a0e4f41010002016f06753d32322631",
                "type" : "nulldata"
            }
        },
        {
            "value" : 0.00000600,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 4f01b233dfae8ed822146e84f8ea20d6e488ca92 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a9144f01b233dfae8ed822146e84f8ea20d6e488ca9288ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "18CkR17en5Tg5Tvs222ki69pr92asTq1W5"
                ]
            }
        },
        {
            "value" : 0.00000600,
            "n" : 2,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 022ebb12c302459a5273161b992f7ee37b3c9ba3 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914022ebb12c302459a5273161b992f7ee37b3c9ba388ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1CYLJ29Atic2Mt8kFjd27NTXzzVDTZEJw"
                ]
            }
        },
        {
            "value" : 49.94656800,
            "n" : 3,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 022ebb12c302459a5273161b992f7ee37b3c9ba3 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914022ebb12c302459a5273161b992f7ee37b3c9ba388ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1CYLJ29Atic2Mt8kFjd27NTXzzVDTZEJw"
                ]
            }
        }
    ]
}
</code></pre>

<colored-coins>
How can I interpret colored-coin raw transaction?
moshaholo
# How can I interpret colored-coin raw transaction?

(Asked by: username_0 on 2015-04-24)

In order to complete a transaction, some parameters should be provided.

Such as transfer\_quantity (provided in OP\_RETURN), destination\_address (provided in vout.scriptPubKey)   
I am wondering where **asset\_id** is in this raw transaction.

```
{
    "hex" : "0100000002c980feda53fd0e5fcd8328db01234543385e48ac16864e22a0169322912f4fd7020000006a47304402203693f5f888d340d6bc1f08e9e62bb819fd3f03d47f69e8c6fc16fd6beb289dfc02205f792edacf2e08017d0e08ecd779c8440cba5f780b5c9e5fa44fbfd9f7904211012103108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07ffffffffc980feda53fd0e5fcd8328db01234543385e48ac16864e22a0169322912f4fd7030000006b4830450221009e2a2c4136bb7527ec04eedb253e6e8c1b5e693e9ebd6411df96e5376630fd5002205eba1253da8fe1e7bac2a8d827d3a033476907ccf8819e70bbd5927dcfafd750012103108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07ffffffff040000000000000000106a0e4f41010002016f06753d3232263158020000000000001976a9144f01b233dfae8ed822146e84f8ea20d6e488ca9288ac58020000000000001976a914022ebb12c302459a5273161b992f7ee37b3c9ba388ac206ab429010000001976a914022ebb12c302459a5273161b992f7ee37b3c9ba388ac00000000",
    "txid" : "92fa631b034a9dbdab8bbd67b1d438242e84549de3a0c7852c917356db0da42b",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "d74f2f91229316a0224e8616ac485e3843452301db2883cd5f0efd53dafe80c9",
            "vout" : 2,
            "scriptSig" : {
                "asm" : "304402203693f5f888d340d6bc1f08e9e62bb819fd3f03d47f69e8c6fc16fd6beb289dfc02205f792edacf2e08017d0e08ecd779c8440cba5f780b5c9e5fa44fbfd9f790421101 03108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07",
                "hex" : "47304402203693f5f888d340d6bc1f08e9e62bb819fd3f03d47f69e8c6fc16fd6beb289dfc02205f792edacf2e08017d0e08ecd779c8440cba5f780b5c9e5fa44fbfd9f7904211012103108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07"
            },
            "sequence" : 4294967295
        },
        {
            "txid" : "d74f2f91229316a0224e8616ac485e3843452301db2883cd5f0efd53dafe80c9",
            "vout" : 3,
            "scriptSig" : {
                "asm" : "30450221009e2a2c4136bb7527ec04eedb253e6e8c1b5e693e9ebd6411df96e5376630fd5002205eba1253da8fe1e7bac2a8d827d3a033476907ccf8819e70bbd5927dcfafd75001 03108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07",
                "hex" : "4830450221009e2a2c4136bb7527ec04eedb253e6e8c1b5e693e9ebd6411df96e5376630fd5002205eba1253da8fe1e7bac2a8d827d3a033476907ccf8819e70bbd5927dcfafd750012103108ee20a69add838c56c2281150e2a7a6cce1aaa9c0a31216e36abb56eb10c07"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 0.00000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_RETURN 4f41010002016f06753d32322631",
                "hex" : "6a0e4f41010002016f06753d32322631",
                "type" : "nulldata"
            }
        },
        {
            "value" : 0.00000600,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 4f01b233dfae8ed822146e84f8ea20d6e488ca92 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a9144f01b233dfae8ed822146e84f8ea20d6e488ca9288ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "18CkR17en5Tg5Tvs222ki69pr92asTq1W5"
                ]
            }
        },
        {
            "value" : 0.00000600,
            "n" : 2,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 022ebb12c302459a5273161b992f7ee37b3c9ba3 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914022ebb12c302459a5273161b992f7ee37b3c9ba388ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1CYLJ29Atic2Mt8kFjd27NTXzzVDTZEJw"
                ]
            }
        },
        {
            "value" : 49.94656800,
            "n" : 3,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 022ebb12c302459a5273161b992f7ee37b3c9ba3 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914022ebb12c302459a5273161b992f7ee37b3c9ba388ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1CYLJ29Atic2Mt8kFjd27NTXzzVDTZEJw"
                ]
            }
        }
    ]
}

```

**Tags:** colored-coins


---

## 1 answers

### Answer by username_1 on 2015-04-25. Score: 1

The OP\_RETURN in output=0 (1st position), we have the hex data `4f41010002016f06753d32322631` which decodes to `OA\x01\x00\x02\x01o\x06u=22&1` in Python, which seems right, since OA precedes open assets hex data.

The data for *asset id* is in that hex code. Everything is. The other inputs are inconsequential.

The reason the other outputs use 600 satoshis (฿ 0.00000600) is because it's just above the dust threshold. You can't send an OP\_RETURN without valid outputs, or priority. The large balance (~฿49) is so the transactions get sufficient priority to be processed.

Going off [Colored Coins @ BTC Wiki](https://en.bitcoin.it/wiki/Colored_Coins#Open_Assets):

```
> Data in the marker output      Description
> -----------------------------  -------------------------------------------------------------------
>  0x6a                           The OP_RETURN opcode.
>  0x10                           The marker output is 16 bytes long.
>  0x4f 0x41                      The Open Assets Protocol tag.
>  0x01 0x00                      Version 1 of the protocol.
>  0x03                           There are 3 items in the asset quantity list.
>  0xac 0x02 0x00 0xe5 0x8e 0x26  The asset quantity list:
>                                 - '0xac 0x02' means output 0 has an asset quantity of 300.
>                                 - Output 1 is skipped and has an asset quantity of 0 because it is the marker output.
>                                 - '0x00' means output 2 has an asset quantity of 0.
>                                 - '0xe5 0x8e 0x26' means output 3 has an asset quantity of 624,485.
>                                 - Outputs after output 3 (if any) have an asset quantity of 0.
>  0x04                           The metadata is 4 bytes long.
>  0x12 0x34 0x56 0x78            Some arbitrary metadata.

```

I don't see an *asset\_id* parameter, so perhaps you can clarify that point. Are you sure it's *Colored Coins*? (ie could it be a specific implementation like [CoinSpark](http://coinspark.org/)?)

> **Comments:**
> **username_0**: Is there a way to calculate the **asset_id** in this transaction?  
> **username_1**: see my edit mate  
> **username_1**: EDIT: Found it! I just need some time to decipher the *openassets* code; https://github.com/OpenAssets/openassets/blob/9c90521e40f549ac13e783a3bbcd639ad12bb587/openassets/protocol.py#L81, perhaps @nickodell or someone who has a minute that's good with Python can help  

---

