plugeth/cmd/mist/assets/ext/example/node-app.js
2015-01-28 10:58:43 +01:00

13 lines
263 B
JavaScript

#!/usr/bin/env node
var web3 = require("../index.js");
web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8080'));
var coinbase = web3.eth.coinbase;
console.log(coinbase);
var balance = web3.eth.balanceAt(coinbase);
console.log(balance);