It seems like "n" is the index, is that true? If that is the case, why is the "n" key necessary?
Example:
bitcoin-cli getrawtransaction b13b4765e46228f3239858c9f18e766b72bed24a56c52b9692e7f021c376e7ce 1
One of the resulting vouts:
"vout": [
{
"value": 0.40000000,
"n": 0,
"scriptPubKey": {
"asm": "OP_HASH160 a88433dd5e9fcee779efdea952e397cf3bfe8aac OP_EQUAL",
"hex": "a914a88433dd5e9fcee779efdea952e397cf3bfe8aac87",
"reqSigs": 1,
"type": "scripthash",
"addresses": [
"3H43pNLbFEU1tWNwZeWxmrLwrLzAxwiC4b"
]
}
},
...
Since it's an array, couldn't you just use the array index? Seems redundant, but i'm sure there's a reason. Thanks