<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>MultiChain Developer Q&amp;A - Recent questions tagged vout</title>
<link>https://www.multichain.com/qa/tag/vout</link>
<description>Powered by Question2Answer</description>
<item>
<title>Send multiply assets in one transaction</title>
<link>https://www.multichain.com/qa/75835/send-multiply-assets-in-one-transaction</link>
<description>Hi, so, two different users, sent me 2 different assets, A and B, obviously, UTXOs with this assets resides in different transactions. What I want, is to consume this UTXOs and send TX to another user with assets A+B in one transaction? Just like we do with native coin, combining UTXOs value until it become &amp;gt;= the value we want to send. All my tries failed with typical node error, mandatory-script-verify-flag. All inputs are signed as it needs to be done with native coin inputs.&lt;br /&gt;
&lt;br /&gt;
Second question, so if the case above is not possible and I will need to create two TXs to send asset A and B, will I be able to send assets A and B in one transaction in case this assets resides in one UTXO from one user?&lt;br /&gt;
&lt;br /&gt;
Thanks in advance</description>
<guid isPermaLink="true">https://www.multichain.com/qa/75835/send-multiply-assets-in-one-transaction</guid>
<pubDate>Sun, 16 Apr 2023 06:03:26 +0000</pubDate>
</item>
<item>
<title>Vout hex decode</title>
<link>https://www.multichain.com/qa/61130/vout-hex-decode</link>
<description>&lt;p&gt;Hi, we have tx example: &lt;a href=&quot;https://explorer.xfccoin.io/api/getrawtransaction?txid=2c471ad416f3098edd2a3c259e87e165ed1420e7e16c93dc16b699aa4e47cf49&amp;amp;decrypt=1&quot; rel=&quot;nofollow&quot;&gt;https://explorer.xfccoin.io/api/getrawtransaction?txid=2c471ad416f3098edd2a3c259e87e165ed1420e7e16c93dc16b699aa4e47cf49&amp;amp;decrypt=1&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Vout 0 hex 76a914c7e599002aa10db30323c355e019e18cea440ebc88ac&lt;span style=&quot;color:#FF0000&quot;&gt;1c&lt;/span&gt;73706b71...&lt;/p&gt;&lt;p&gt;What does this single byte between p2pkh script and metadata do? How to interpret it?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Vout 1 hex:&lt;/p&gt;&lt;p&gt;76a914a8d59dfa8a7478240aaaacb6f5bc4b46614a793688ac&lt;span style=&quot;color:#FF0000&quot;&gt;4d0403&lt;/span&gt;73706b71...&lt;/p&gt;&lt;p&gt;Again what is this byte sequence for?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Additional question, if i have some assets: x(10) y(10) z(10) and I am sending one X asset to someone, this tx should ALWAYS contain change vout with x(9) y(10) z(10) and if I am creating tx from scratch (without multichaind) - I will have to create this change output by myself with all unspent assets I have?&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/61130/vout-hex-decode</guid>
<pubDate>Thu, 18 Aug 2022 12:38:20 +0000</pubDate>
</item>
<item>
<title>Vout n[2] in &quot;issuefirst&quot; transaction</title>
<link>https://www.multichain.com/qa/60322/vout-n-2-in-issuefirst-transaction</link>
<description>Hi, somehow my previous question went to approvement once again, im duplicating it here.&lt;br /&gt;
&lt;br /&gt;
So the question is - what is third vout in this transaction for: &lt;a href=&quot;https://explorer.xfccoin.io/api/getrawtransaction?txid=9a65248b9e7007fabbdeef0054d7d0eb58f002b28a75ec6b1899fd6d5c21e3be&amp;amp;decrypt=1&quot; rel=&quot;nofollow&quot;&gt;https://explorer.xfccoin.io/api/getrawtransaction?txid=9a65248b9e7007fabbdeef0054d7d0eb58f002b28a75ec6b1899fd6d5c21e3be&amp;amp;decrypt=1&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I saw previous answer by admin, and it says that this vout is change for the address who issued new asset, but as far as i understand it is not the case. Cause change address is totally different from issuer address in this transaction.&lt;br /&gt;
&lt;br /&gt;
Issuer: faCGaHimGTPf1bt3PJJfnjLLMadi4Vtc6gvuMp&lt;br /&gt;
&lt;br /&gt;
Third vout: fPnjGLkQdBkc6CRecs4TPG1GnG1zuoKXgaueEe</description>
<guid isPermaLink="true">https://www.multichain.com/qa/60322/vout-n-2-in-issuefirst-transaction</guid>
<pubDate>Thu, 04 Aug 2022 07:52:09 +0000</pubDate>
</item>
<item>
<title>Meaning of n[2] vout in &quot;issuefirst&quot; type of transaction</title>
<link>https://www.multichain.com/qa/60198/meaning-of-n-2-vout-in-issuefirst-type-of-transaction</link>
<description>Hi, i'm trying to understand raw transaction.&lt;br /&gt;
&lt;br /&gt;
For example we have such tx: &lt;a href=&quot;https://explorer.xfccoin.io/api/getrawtransaction?txid=26853a6c330b2dc334d38541da04b591eb7161f2f48e916491fc80475099ce2c&amp;amp;decrypt=1&quot; rel=&quot;nofollow&quot;&gt;https://explorer.xfccoin.io/api/getrawtransaction?txid=26853a6c330b2dc334d38541da04b591eb7161f2f48e916491fc80475099ce2c&amp;amp;decrypt=1&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
It is issuing new asset XFCPRMALINOV&lt;br /&gt;
&lt;br /&gt;
n[0] vout contains new issuance quantity metadata before OP_DROP and stuff;&lt;br /&gt;
&lt;br /&gt;
n[1] vout contains name of new asset before OP_DROP and stuff;&lt;br /&gt;
&lt;br /&gt;
Its pretty clear. But..&lt;br /&gt;
&lt;br /&gt;
What is vout n[2] for? It is utxo for some address without any value in native coin. How the address mentioned in this vout interacts with newly created asset if it does?&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
<guid isPermaLink="true">https://www.multichain.com/qa/60198/meaning-of-n-2-vout-in-issuefirst-type-of-transaction</guid>
<pubDate>Wed, 03 Aug 2022 13:26:49 +0000</pubDate>
</item>
<item>
<title>What does vin and vout signifies? what is the purpose of vin and vout.</title>
<link>https://www.multichain.com/qa/18488/what-does-vin-and-vout-signifies-what-the-purpose-vin-and-vout</link>
<description>I read the reference given by you but still that hasn't cleared my doubts. I am not getting the significance of vin and vout.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/18488/what-does-vin-and-vout-signifies-what-the-purpose-vin-and-vout</guid>
<pubDate>Wed, 04 Mar 2020 04:08:38 +0000</pubDate>
</item>
<item>
<title>scriptPubKey</title>
<link>https://www.multichain.com/qa/12228/scriptpubkey</link>
<description>&lt;p&gt;&lt;span style=&quot;font-family:helvetica,arial,sans-serif; font-size:14px&quot;&gt;&lt;span style=&quot;background-color:#DAA520&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new,courier,monospace; font-size:14px&quot;&gt;&lt;span style=&quot;background-color:#DAA520&quot;&gt;scriptPubKey&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:helvetica,arial,sans-serif; font-size:14px&quot;&gt;&lt;span style=&quot;background-color:#DAA520&quot;&gt;&amp;nbsp;represents the conditions under which this output can be spent in the input of a new transaction. In most cases, it just contains a representation of the address owning that output, meaning that it can only be spent by a transaction signed by the private key corresponding to that address.&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;On your above statement , lets say address &quot;A &quot; has 5 coins or asset and &quot;A&quot; sends 2 coin to address &quot;B&quot; then now&amp;nbsp; owner of 2 coins out of 5 coins is &quot;B&quot; so &lt;span style=&quot;background-color:#40E0D0&quot;&gt;scriptPubKey&lt;/span&gt; contain address of B who is new owner of asset?&lt;br&gt;&lt;br&gt;and in this case 3 coins which is unspent that will revert back to sender that would be unspent transaction output is it?&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/12228/scriptpubkey</guid>
<pubDate>Wed, 09 Jan 2019 10:00:43 +0000</pubDate>
</item>
<item>
<title>The value of Vout in my decoderaw transaction result is different from the size I entered in getwallet transaction</title>
<link>https://www.multichain.com/qa/12148/decoderaw-transaction-different-entered-getwallet-transaction</link>
<description>decoderawtrawnsaction:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;value&amp;quot; : 2999999998.99998,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;quot;n&amp;quot; : 1,&lt;br /&gt;
&lt;br /&gt;
getwallettransaction:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;amount&amp;quot; : -1,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;fee&amp;quot; : -0.000022,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;confirmations&amp;quot; : 11,&lt;br /&gt;
&lt;br /&gt;
The real result of decoderaw transaction should be 29999998.99999978, which shows only 2999999998.9999998.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/12148/decoderaw-transaction-different-entered-getwallet-transaction</guid>
<pubDate>Thu, 03 Jan 2019 06:17:59 +0000</pubDate>
</item>
<item>
<title>What does &quot;vout&quot; : -1 mean in preparelockunspent output?</title>
<link>https://www.multichain.com/qa/11471/what-does-vout-1-mean-in-preparelockunspent-output</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;what does &lt;em&gt;&quot;vout&quot; : -1&lt;/em&gt; mean in &lt;em&gt;preparelockunspent&lt;/em&gt; output?&lt;br&gt;I keep getting alternately &lt;em&gt;-1&lt;/em&gt; and &lt;em&gt;0&lt;/em&gt; and I don’t understand why.&lt;/p&gt;&lt;p&gt;The method I used is the following:&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;em&gt;preparelockunspent '{&quot;asset1&quot;:1}'&lt;/em&gt;&lt;/p&gt;&lt;p&gt;I have got more than 300 units of &lt;em&gt;asset1&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;Thank you very much.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&amp;nbsp;&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/11471/what-does-vout-1-mean-in-preparelockunspent-output</guid>
<pubDate>Mon, 05 Nov 2018 23:03:01 +0000</pubDate>
</item>
<item>
<title>How a vout (and particularly scriptPubKey) works ?</title>
<link>https://www.multichain.com/qa/10181/how-a-vout-and-particularly-scriptpubkey-works</link>
<description>&lt;p&gt;Hello !&lt;/p&gt;&lt;p&gt;I've some questions about the vout of a transaction, and to be more precise, about scriptPubKey.&lt;/p&gt;&lt;p&gt;As I can see, a typical output transaction looks like this :&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;background-color:#D3D3D3&quot;&gt;{
            &quot;value&quot; : 0.00000000,
            &quot;n&quot; : 1,
            &quot;scriptPubKey&quot; : {
                &quot;asm&quot; : &quot;OP_DUP OP_HASH160 eadb51503d0c15d2d36c3354dd0bfeb63ec4b91b OP_EQUALVERIFY OP_CHECKSIG 73706b67c166070000000000 OP_DROP&quot;,
                &quot;hex&quot; : &quot;76a914eadb51503d0c15d2d36c3354dd0bfeb63ec4b91b88ac0c73706b67c16607000000000075&quot;,
                &quot;reqSigs&quot; : 1,
                &quot;type&quot; : &quot;pubkeyhash&quot;,
                &quot;addresses&quot; : [
                    &quot;1Yk36JuVbQuyr1y5uSJQDLfvnCxpHSi3WNsSgg&quot;
                ]
            },
            &quot;assets&quot; : [
                {
                    &quot;name&quot; : &quot;asset-lot@kjlppp&quot;,
                    &quot;issuetxid&quot; : &quot;17b6762b2f5752e224bcd302852d40b68443c04a2bb68d71c473ac4355da30a3&quot;,
                    &quot;assetref&quot; : &quot;86-491-46615&quot;,
                    &quot;qty&quot; : 485.05700000,
                    &quot;raw&quot; : 485057,
                    &quot;type&quot; : &quot;issuefirst&quot;
                }
            ],
            &quot;permissions&quot; : [
            ],
            &quot;items&quot; : [
            ]
        }&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;When seeing this, some questions pop out of my mind :&lt;/p&gt;&lt;p&gt;- What is exactly the purpose of scriptPubKey ?&lt;/p&gt;&lt;p&gt;- What is the 'addresses' field in scriptPubKey ? How can it happen to have more than one address on the list ? How the addresses in this field are chosen ?&lt;/p&gt;&lt;p&gt;- Is it possible to clearly identify in a transaction vout to which address an asset (from the assets list) is sent&amp;nbsp;?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thank you very much for the answers !&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/10181/how-a-vout-and-particularly-scriptpubkey-works</guid>
<pubDate>Thu, 05 Jul 2018 14:29:25 +0000</pubDate>
</item>
<item>
<title>Is it possible to constrain a single asset by vout</title>
<link>https://www.multichain.com/qa/9483/is-it-possible-to-constrain-a-single-asset-by-vout</link>
<description>Hello,&lt;br /&gt;
&lt;br /&gt;
I want to know if it is possible to constrain one asset per vout.&lt;br /&gt;
&lt;br /&gt;
I will explain with a use case :&lt;br /&gt;
&lt;br /&gt;
- I have a transaction tx1, having 10 asset@A in unspent vout X&lt;br /&gt;
&lt;br /&gt;
- I have a transaction tx2, having 12 asset@B in unspent vout Y&lt;br /&gt;
&lt;br /&gt;
- I create a new transaction tx3 that do these things :&lt;br /&gt;
&lt;br /&gt;
-- Taking as vin0 the tx1 voutX&lt;br /&gt;
&lt;br /&gt;
-- Taking as vin1 the tx2 voutY&lt;br /&gt;
&lt;br /&gt;
-- Burning 5 asset@A and 6 asset@B.&lt;br /&gt;
&lt;br /&gt;
-- Issuing 5+6=11 asset@C&lt;br /&gt;
&lt;br /&gt;
-- Sending the remaining assets to the proper addresses.&lt;br /&gt;
&lt;br /&gt;
Finally, I have for tx3:&lt;br /&gt;
&lt;br /&gt;
- vout 0: Sending 5 asset@A and 6 asset@B to burnAddress&lt;br /&gt;
&lt;br /&gt;
- vout1: ....&lt;br /&gt;
&lt;br /&gt;
- vout2: Sending the issued 11 asset@C to original address&lt;br /&gt;
&lt;br /&gt;
- vout3: nulldata&lt;br /&gt;
&lt;br /&gt;
- vout4: nulldata&lt;br /&gt;
&lt;br /&gt;
- vout5: nulldata&lt;br /&gt;
&lt;br /&gt;
- vout6: Sending back the remaining 5 asset@A and 6 asset@B to original address.&lt;br /&gt;
&lt;br /&gt;
Is there any way to have instead :&lt;br /&gt;
&lt;br /&gt;
- vout6: Sending back the remaining 5 asset@A to original address.&lt;br /&gt;
&lt;br /&gt;
- vout7: Sending back the remaining 6 asset@B to original address.&lt;br /&gt;
&lt;br /&gt;
Thanks.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/9483/is-it-possible-to-constrain-a-single-asset-by-vout</guid>
<pubDate>Thu, 26 Apr 2018 08:49:19 +0000</pubDate>
</item>
<item>
<title>vout value to be different from 0</title>
<link>https://www.multichain.com/qa/4749/vout-value-to-be-different-from-0</link>
<description>Hi, What is the condition or scenario for &amp;quot;vout&amp;quot; value to be different from &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;txid: 'ae6d5658b73b5d4d8638da68e443d460fa7996c1e3e6a7dde0c2899afee0299b',&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vout: 0,&lt;br /&gt;
&lt;br /&gt;
Thanks,</description>
<guid isPermaLink="true">https://www.multichain.com/qa/4749/vout-value-to-be-different-from-0</guid>
<pubDate>Wed, 12 Apr 2017 09:19:26 +0000</pubDate>
</item>
<item>
<title>Vout and txid</title>
<link>https://www.multichain.com/qa/1060/vout-and-txid</link>
<description>after firing &amp;quot;prpearelockunspent&amp;quot; , it returns txid and vout.&lt;br /&gt;
&lt;br /&gt;
What exactly is txid and vout?&lt;br /&gt;
&lt;br /&gt;
How they are generated?</description>
<guid isPermaLink="true">https://www.multichain.com/qa/1060/vout-and-txid</guid>
<pubDate>Thu, 03 Mar 2016 15:20:07 +0000</pubDate>
</item>
</channel>
</rss>