With bitcoin
, I'd use the JSON-RPC and keep track of transactions in blocks and have to build the UTXO database myself. Is it the same with ethereum?
2 Answers
There is no such thing as UTXOs with Ethereum, it's account based instead. You can query a nodes JSON-RPC to get balances, code, storage, etc. There are also many libraries (including Web3.js) to make this much easier.
-
I can query ANY account balance directly, regardless of whether or not I have the private keys?– ShamoonMay 8, 2018 at 17:07
-
Correct. You do not need an accounts private key to query balances. May 8, 2018 at 17:34
Ethereum is not depended upon the unspent transaction output or UTXo. Instead, it depends on the state of the system. It only has account address linked with balance. For spending a certain amount, we only required an account with a balance greater than the amount to spend and its passphrase.[spending with wallet]
-
1