I know that we have to calc inputs total minus outputs to get transaction fee, but using getrawtrasnaction
RPC call, inputs values are not attached. how is it possible to get transaction fee?
Array
(
[txid] => 318abc03cfa52c996b01d6ff10faf86447341d78acdf849026dd4c22ebd56cab
[hash] => 318abc03cfa52c996b01d6ff10faf86447341d78acdf849026dd4c22ebd56cab
[version] => 2
[size] => 226
[vsize] => 226
[locktime] => 0
[vin] => Array
(
[0] => Array
(
[txid] => 71c6f340ef5f4688136e8b308393ff74a89b4bf780bf0e3c3611fa34dc858c07
[vout] => 0
[scriptSig] => Array
(
[asm] => 30450221009c305ffb2f04517ba1f422f22f0eded5afb855f0ee8cdd2634259774dfb0846b022019e05a9d25f21e808a0be320e3956a1e6fcb57cc4d725404db0bbab0ced78a88[ALL] 0221b96462902141e297804981ebc5465e475ebf0f4f4d7a4e558edc4856b33e75
[hex] => 4830450221009c305ffb2f04517ba1f422f22f0eded5afb855f0ee8cdd2634259774dfb0846b022019e05a9d25f21e808a0be320e3956a1e6fcb57cc4d725404db0bbab0ced78a8801210221b96462902141e297804981ebc5465e475ebf0f4f4d7a4e558edc4856b33e75
)
[sequence] => 4294967295
)
)
[vout] => Array
(
[0] => Array
(
[value] => 0.01
[n] => 0
[scriptPubKey] => Array
(
[asm] => OP_DUP OP_HASH160 e673381ba3ce7fa72520a09ee4e3ad68cd5d6528 OP_EQUALVERIFY OP_CHECKSIG
[hex] => 76a914e673381ba3ce7fa72520a09ee4e3ad68cd5d652888ac
[reqSigs] => 1
[type] => pubkeyhash
[addresses] => Array
(
[0] => n2XTjk57QJgjevmYb75tJHy7AJGGeoJv2e
)
)
)
[1] => Array
(
[value] => 0.089981
[n] => 1
[scriptPubKey] => Array
(
[asm] => OP_DUP OP_HASH160 108e2c445972c2561d8cff8ee487cfe6e054ab59 OP_EQUALVERIFY OP_CHECKSIG
[hex] => 76a914108e2c445972c2561d8cff8ee487cfe6e054ab5988ac
[reqSigs] => 1
[type] => pubkeyhash
[addresses] => Array
(
[0] => mh2VRUG7BA8Rutz9tqTuhinqZxRo3QinGi
)
)
)
)
[hex] => 0200000001078c85dc34fa11363c0ebf80f74b9ba874ff9383308b6e1388465fef40f3c671000000006b4830450221009c305ffb2f04517ba1f422f22f0eded5afb855f0ee8cdd2634259774dfb0846b022019e05a9d25f21e808a0be320e3956a1e6fcb57cc4d725404db0bbab0ced78a8801210221b96462902141e297804981ebc5465e475ebf0f4f4d7a4e558edc4856b33e75ffffffff0240420f00000000001976a914e673381ba3ce7fa72520a09ee4e3ad68cd5d652888acd44c8900000000001976a914108e2c445972c2561d8cff8ee487cfe6e054ab5988ac00000000
[blockhash] => eb31cb0c8de0e8b3219537e9304ee7d09d5dc7092ef17caed470b9a1aed2485e
[confirmations] => 2269
[time] => 1522693379
[blocktime] => 1522693379
)