EthereumAccount - ARitz-Cracker/arc-web3 GitHub Wiki
EthereumAccount is an class representing... Ethereum accounts, funny enough.
Properties:
- (AddressString)
address: The account's address.
Methods:
new EthereumAccount(Web3Connection, AddressString)
EthereumAccounts only act as an abstraction to check an account balance in a more object-oriented way.
// No example. (Feel free to suggest one!)
Promise(BigNumber) EthereumAccount.balance([Number blockNumber])
Returns the accounts balance in wei. If you want the ether value, divide by 1e18. You can specify a block number if you wish to look up historical balance. If no arguments are given, it will return the latest balance.
// No example. (Feel free to suggest one!)
EthereumAccount.setSenderFor(EthereumContract)
Any future calls to the specified contract will set the msg.sender value to this EthereumAccount by default.
// No example. (Feel free to suggest one!)
EthereumAccount.setSignerFor(EthereumContract)
Alias of the above function. You can't actually use this to sign transactions. Attempting to call a writable function after setting an EthereumAccount as the signer will throw an error. If you want to call writable functions, then you should use an EthereumAccountSignable.
// No example. (Feel free to suggest one!)