arnaucube
arnaucube/reciprokaPublic Self-hosted repository
reciproka/wallet/src/eth/eth.js
wallet/src/eth/eth.jsRaw
 1import Web3 from 'web3';
 2const web3 = new Web3("https://ropsten.infura.io/TFnR8BWJlqZOKxHHZNcs");
 3
 4var account = web3.eth.accounts.create()
 5console.log("account", account)
 6console.log("address", account.address)
 7web3.eth.getAccounts(function(error, result){
 8  console.log(result)
 9})
10
11web3.eth.getBalance(account.address)
12  .then(balance => {
13
14    console.log("balance", balance)
15  })