user119272: i'm trying to understand bitcoin transaction extract from bitcoin core with RPC,
with an example this block hash : 00000000d14f2e97678951ad004d6699babd27e07ca722c46b30dc24c67eed7a
{"method": 'getblock', "params": ["00000000d14f2e97678951ad004d6699babd27e07ca722c46b30dc24c67eed7a", 2], "jsonrpc": "2.0"}

json block from getblock
{
    'hash': '00000000d14f2e97678951ad004d6699babd27e07ca722c46b30dc24c67eed7a',
    'confirmations': 677712,
    'strippedsize': 489,
    'size': 489,
    'weight': 1956,
    'height': 728,
    'version': 1,
    'versionHex': '00000001',
    'merkleroot': '1f7fd770697c167ca75e3d742f3b1b81244165e0fee87310cd20b15f6975b961',
    'tx': [{
        'txid': '5fe6030e8a649b3b3fb257303e89a06d6556226e24118b494f9ccbba06e96254',
        'hash': '5fe6030e8a649b3b3fb257303e89a06d6556226e24118b494f9ccbba06e96254',
        'version': 1,
        'size': 134,
        'vsize': 134,
        'weight': 536,
        'locktime': 0,
        'vin': [{
            'coinbase': '04ffff001d0164',
            'sequence': 4294967295
        }],
        'vout': [{
            'value': 50.0,
            'n': 0,
            'scriptPubKey': {
                'asm': '04fa4b30422c7820c4ef979eaa39f770b32dcddc433cfd4d3040d3f2dc337e445dfd80fd4a3afbabe11e861fe30a28c5acc0f59915d9e419ffecd8ce374d46ddf5 OP_CHECKSIG',
                'hex': '4104fa4b30422c7820c4ef979eaa39f770b32dcddc433cfd4d3040d3f2dc337e445dfd80fd4a3afbabe11e861fe30a28c5acc0f59915d9e419ffecd8ce374d46ddf5ac',
                'type': 'pubkey'
            }
        }],
        'hex': '01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0164ffffffff0100f2052a01000000434104fa4b30422c7820c4ef979eaa39f770b32dcddc433cfd4d3040d3f2dc337e445dfd80fd4a3afbabe11e861fe30a28c5acc0f59915d9e419ffecd8ce374d46ddf5ac00000000'
    }, {
        'txid': '6f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516',
        'hash': '6f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516',
        'version': 1,
        'size': 274,
        'vsize': 274,
        'weight': 1096,
        'locktime': 0,
        'vin': [{
            'txid': 'ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6',
            'vout': 0,
            'scriptSig': {
                'asm': '3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d[ALL]',
                'hex': '493046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01'
            },
            'sequence': 4294967295
        }, {
            'txid': '2db69558056d0132d9848851fd20329be9cd590fa5ae2b3c55f58931f42e27f7',
            'vout': 0,
            'scriptSig': {
                'asm': '3046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf[ALL]',
                'hex': '493046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf01'
            },
            'sequence': 4294967295
        }],
        'vout': [{
            'value': 100.0,
            'n': 0,
            'scriptPubKey': {
                'asm': 'OP_DUP OP_HASH160 12ab8dc588ca9d5787dde7eb29569da63c3a238c OP_EQUALVERIFY OP_CHECKSIG',
                'hex': '76a91412ab8dc588ca9d5787dde7eb29569da63c3a238c88ac',
                'reqSigs': 1,
                'type': 'pubkeyhash',
                'addresses': ['12higDjoCCNXSA95xZMWUdPvXNmkAduhWv']
            }
        }],
        'hex': '0100000002f60b5e96f09422354ab150b0e506c4bffedaf20216d30059cc5a3061b4c83dff000000004a493046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01fffffffff7272ef43189f5553c2baea50f59cde99b3220fd518884d932016d055895b62d000000004a493046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf01ffffffff0100e40b54020000001976a91412ab8dc588ca9d5787dde7eb29569da63c3a238c88ac00000000'
    }],
    'time': 1232133515,
    'mediantime': 1232128717,
    'nonce': 95106676,
    'bits': '1d00ffff',
    'difficulty': 1,
    'chainwork': '000000000000000000000000000000000000000000000000000002d902d902d9',
    'nTx': 2,
    'previousblockhash': '000000001c7eb6ab129cf14659aea1f77f6e116ea8da2193182b08eae6ecf5f7',
    'nextblockhash': '00000000ce8f753a6df03ffba3ed05db6cf79013e79b7d20c87e0e88b7672fbf'
}

in "tx" i can see multiple transaction stored inside block, what's difference between, i supposed "vin" is for incoming transaction but whey they dont have similar architectur ?
Thanks
'vin': [{
            'coinbase': '04ffff001d0164',
            'sequence': 4294967295
        }],


# is not similar to 

'vin': [{
            'txid': 'ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6',
            'vout': 0,
            'scriptSig': {
                'asm': '3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d[ALL]',
                'hex': '493046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01'
            },
            'sequence': 4294967295
        }, {
            'txid': '2db69558056d0132d9848851fd20329be9cd590fa5ae2b3c55f58931f42e27f7',
            'vout': 0,
            'scriptSig': {
                'asm': '3046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf[ALL]',
                'hex': '493046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf01'
            },
            'sequence': 4294967295
        }],


do you have a link who help me to understand every title of a raw
block transaction ? (i didn't found)
vin is for incoming fund, and vout is for outgoing fund ? correct ?

thanks

user-1: "vin" is the array of inputs for a specific transaction.
"vout" is the array of, you guessed it, outputs of a specific transaction.
In case you aren't familiar: When you receive bitcoin to an address, your address data (to keep it in simple terms) is actually put into an "output". These outputs that aren't spent (yet) are called unspent transaction outputs, or UTXO for short.
Your wallet's balance is the total of all UTXOs values associated with your wallet.
When you create a transaction and send bitcoin to someone else or even yourself, you are spending those UTXOs, and the necessary data to spend those outputs is put into a corresponding input.
For example, in that block, the transaction with txid: 6f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516
Let's look at the first input in the "vin" array:
'vin': [{
            'txid': 'ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6',
            'vout': 0,
            'scriptSig': {
                'asm': '3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d[ALL]',
                'hex': '493046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01'
            },
            'sequence': 4294967295
        }


It is spending from output 0 of transaction ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6
with the required signature data in the scriptSig to verify that they can spend this UTXO. At the time when this transaction was made, outputs were P2PK, so there's no public key in the scriptSig. Nowadays the most common output is P2PKH, so there would be a public key attached in the scriptSig.
As for the first transaction that doesn't have a similar "vin": That's the coinbase transaction. There is no UTXO to spend, as new coins are being generated in this transaction as part of the coinbase reward (the mining reward), so there's no signature that you would commonly see, like in the second transaction.

119272: <p>i'm trying to understand bitcoin transaction extract from bitcoin core with RPC,
with an example this block hash : <strong>00000000d14f2e97678951ad004d6699babd27e07ca722c46b30dc24c67eed7a</strong></p>
<pre><code>{&quot;method&quot;: 'getblock', &quot;params&quot;: [&quot;00000000d14f2e97678951ad004d6699babd27e07ca722c46b30dc24c67eed7a&quot;, 2], &quot;jsonrpc&quot;: &quot;2.0&quot;}
</code></pre>
<p><strong>json block from getblock</strong></p>
<pre><code>{
    'hash': '00000000d14f2e97678951ad004d6699babd27e07ca722c46b30dc24c67eed7a',
    'confirmations': 677712,
    'strippedsize': 489,
    'size': 489,
    'weight': 1956,
    'height': 728,
    'version': 1,
    'versionHex': '00000001',
    'merkleroot': '1f7fd770697c167ca75e3d742f3b1b81244165e0fee87310cd20b15f6975b961',
    'tx': [{
        'txid': '5fe6030e8a649b3b3fb257303e89a06d6556226e24118b494f9ccbba06e96254',
        'hash': '5fe6030e8a649b3b3fb257303e89a06d6556226e24118b494f9ccbba06e96254',
        'version': 1,
        'size': 134,
        'vsize': 134,
        'weight': 536,
        'locktime': 0,
        'vin': [{
            'coinbase': '04ffff001d0164',
            'sequence': 4294967295
        }],
        'vout': [{
            'value': 50.0,
            'n': 0,
            'scriptPubKey': {
                'asm': '04fa4b30422c7820c4ef979eaa39f770b32dcddc433cfd4d3040d3f2dc337e445dfd80fd4a3afbabe11e861fe30a28c5acc0f59915d9e419ffecd8ce374d46ddf5 OP_CHECKSIG',
                'hex': '4104fa4b30422c7820c4ef979eaa39f770b32dcddc433cfd4d3040d3f2dc337e445dfd80fd4a3afbabe11e861fe30a28c5acc0f59915d9e419ffecd8ce374d46ddf5ac',
                'type': 'pubkey'
            }
        }],
        'hex': '01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0164ffffffff0100f2052a01000000434104fa4b30422c7820c4ef979eaa39f770b32dcddc433cfd4d3040d3f2dc337e445dfd80fd4a3afbabe11e861fe30a28c5acc0f59915d9e419ffecd8ce374d46ddf5ac00000000'
    }, {
        'txid': '6f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516',
        'hash': '6f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516',
        'version': 1,
        'size': 274,
        'vsize': 274,
        'weight': 1096,
        'locktime': 0,
        'vin': [{
            'txid': 'ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6',
            'vout': 0,
            'scriptSig': {
                'asm': '3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d[ALL]',
                'hex': '493046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01'
            },
            'sequence': 4294967295
        }, {
            'txid': '2db69558056d0132d9848851fd20329be9cd590fa5ae2b3c55f58931f42e27f7',
            'vout': 0,
            'scriptSig': {
                'asm': '3046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf[ALL]',
                'hex': '493046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf01'
            },
            'sequence': 4294967295
        }],
        'vout': [{
            'value': 100.0,
            'n': 0,
            'scriptPubKey': {
                'asm': 'OP_DUP OP_HASH160 12ab8dc588ca9d5787dde7eb29569da63c3a238c OP_EQUALVERIFY OP_CHECKSIG',
                'hex': '76a91412ab8dc588ca9d5787dde7eb29569da63c3a238c88ac',
                'reqSigs': 1,
                'type': 'pubkeyhash',
                'addresses': ['12higDjoCCNXSA95xZMWUdPvXNmkAduhWv']
            }
        }],
        'hex': '0100000002f60b5e96f09422354ab150b0e506c4bffedaf20216d30059cc5a3061b4c83dff000000004a493046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01fffffffff7272ef43189f5553c2baea50f59cde99b3220fd518884d932016d055895b62d000000004a493046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf01ffffffff0100e40b54020000001976a91412ab8dc588ca9d5787dde7eb29569da63c3a238c88ac00000000'
    }],
    'time': 1232133515,
    'mediantime': 1232128717,
    'nonce': 95106676,
    'bits': '1d00ffff',
    'difficulty': 1,
    'chainwork': '000000000000000000000000000000000000000000000000000002d902d902d9',
    'nTx': 2,
    'previousblockhash': '000000001c7eb6ab129cf14659aea1f77f6e116ea8da2193182b08eae6ecf5f7',
    'nextblockhash': '00000000ce8f753a6df03ffba3ed05db6cf79013e79b7d20c87e0e88b7672fbf'
}
</code></pre>
<p>in &quot;tx&quot; i can see multiple transaction stored inside block, what's difference between, i supposed &quot;vin&quot; is for incoming transaction but whey they dont have similar architectur ?</p>
<p><strong>Thanks</strong></p>
<pre><code>'vin': [{
            'coinbase': '04ffff001d0164',
            'sequence': 4294967295
        }],


# is not similar to 

'vin': [{
            'txid': 'ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6',
            'vout': 0,
            'scriptSig': {
                'asm': '3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d[ALL]',
                'hex': '493046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01'
            },
            'sequence': 4294967295
        }, {
            'txid': '2db69558056d0132d9848851fd20329be9cd590fa5ae2b3c55f58931f42e27f7',
            'vout': 0,
            'scriptSig': {
                'asm': '3046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf[ALL]',
                'hex': '493046022100a2ab7cdc5b67aca032899ea1b262f6e8181060f5a34ee667a82dac9c7b7db4c3022100911bc945c4b435df8227466433e56899fbb65833e4853683ecaa12ee840d16bf01'
            },
            'sequence': 4294967295
        }],
</code></pre>
<ul>
<li>do you have a link who help me to understand every title of a raw
block transaction ? (i didn't found)</li>
<li>vin is for incoming fund, and vout is for outgoing fund ? correct ?</li>
</ul>
<p>thanks</p>
 -1: <p>&quot;vin&quot; is the array of inputs for a specific transaction.</p>
<p>&quot;vout&quot; is the array of, you guessed it, outputs of a specific transaction.</p>
<p>In case you aren't familiar: When you receive bitcoin to an address, your address data (to keep it in simple terms) is actually put into an &quot;output&quot;. These outputs that aren't spent (yet) are called unspent transaction outputs, or UTXO for short.</p>
<p>Your wallet's balance is the total of all UTXOs values associated with your wallet.</p>
<p>When you create a transaction and send bitcoin to someone else or even yourself, you are spending those UTXOs, and the necessary data to spend those outputs is put into a corresponding input.</p>
<p>For example, in that block, the transaction with txid: <code>6f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516</code></p>
<p>Let's look at the first input in the &quot;vin&quot; array:</p>
<pre><code>'vin': [{
            'txid': 'ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6',
            'vout': 0,
            'scriptSig': {
                'asm': '3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d[ALL]',
                'hex': '493046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01'
            },
            'sequence': 4294967295
        }

</code></pre>
<p>It is spending from output <code>0</code> of transaction <code>ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6</code>
with the required signature data in the <code>scriptSig</code> to verify that they can spend this UTXO. At the time when this transaction was made, outputs were P2PK, so there's no public key in the scriptSig. Nowadays the most common output is P2PKH, so there would be a public key attached in the scriptSig.</p>
<p>As for the first transaction that doesn't have a similar &quot;vin&quot;: That's the coinbase transaction. There is no UTXO to spend, as new coins are being generated in this transaction as part of the coinbase reward (the mining reward), so there's no signature that you would commonly see, like in the second transaction.</p>
