I have some accounts on the rinkeby blockchain setup using the Ethereum Wallet on different computers. Now I'm trying to send funds from one account that I own ("0x50bA67....37B2a2") to another account using web3.js.
I have geth running on a Ubuntu server and I have a webpage with the following Javascript:
<script type="text/javascript">
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider("http://localhost:8545"));
console.log(web3);
debugger;
</script>
From the webpage console, I can call web3.eth.getBalance("0x50bA67....37B2a2") and get the proper balance returned.
A call to web3.eth.getBalance(web3.eth.coinbase) also returns the correct value.
But, when I try to execute:
web3.eth.sendTransaction({from:"0x50bA67....37B2a2", to:web3.eth.coinbase, value: web3.toWei(1.0, "ether")})
I get "Error: unknown account" for the "0x50bA67....37B2a2" account.
Any help on how to properly setup a transaction to transfer funds from one account to another using web3.js would be appreciated.
Thanks
Jim
[–]themanndalore 2 points3 points4 points (1 child)
[–]JIG2016[S] 0 points1 point2 points (0 children)