[Ethereum] what arguments does the sendTransaction function take

cpp-ethereumgo-ethereumtransactionsweb3js

I have set up my private blockchain using geth and am using web3 to call different methods. I have successfully created new accounts from the web browser and can view all addresses and the balances. Next i am trying to send some ether from one account to the other.

In javascript I have

acc1 = web3.eth.accounts[0];  
acc2 = web3.eth.accounts[1];   
web3.eth.sendTransaction({from: acc1, to: acc2, Value: 1})

I encounter an error as follows
Error: invalid argument 0: cannot unmarshal non-string as hex data

Has anyone faced this?

Best Answer

It's not going to like the big "V" because it's case-sensitive.

Here's a reference to the whole list:

https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethsendtransaction

Hope it helps.