2
The Bitcoin RPC calls all use 8 digit decimals ('reals') to encode amounts of satoshis. For example, if I get a transaction output, it might look like this:
{
"value" : 0.00050000,
"n" : 1,
"scriptPubKey" : {
"asm" : "OP_HASH160 c6e0b29d2aa23b6436cec99e65dfeed2c64a2cad OP_EQUAL",
"hex" : "a914c6e0b29d2aa23b6436cec99e65dfeed2c64a2cad87",
"reqSigs" : 1,
"type" : "scripthash",
"addresses" : [
"3KpatoAjz3H5huJJieSpH4j7qFUeTXMnFC"
]
}
Is there a reason the developers decided to work with "0.00050000" instead of just "50000"? A whole number seems like it would be better for computers to work with.
EDIT: I guess the other half of this is that if the RPC calls are being used by a person, then it is easier to use with amounts in decimals (a human can tell the difference between 5.5 and 0.55 a lot easier than 55000000 and 5500000). So I guess the real question is, is the RPC interface meant to be used more for human command line use or for coding applications' use?