How to get amount in RPC I am developing a bitcoin wallet for education purposes, and i'm working on a getbalance method that given an address i return the balance of the address. 

Problem is, when communicating via the RPC protocol i am given the amount in a double format rather than satoshi (int). And i would like to provide the amount in Satoshi's.

How do i properly convert the double amount, into uint64 satoshi amount?
Since double is not an accurate value, how do I make sure that my "users" get the correct value for their balance, or on their transactions?

Thanks,
The amounts returned by Bitcoin Core are accurate. They are not actually doubles; they're just output that way for convenience. Bitcoin Core internally uses a int64 and the amounts are satoshis. When outputting for users, the int64 is used and a string formatter just puts a decimal point in the appropriate place. Since it already is exact, you just need to drop the decimal point. The easiest way to do this is to take the output as a string, remove the decimal point, and convert that string to an integer.