plugeth/cmd/mist/assets/ext/example/node-app.js

13 lines
263 B
JavaScript
Raw Normal View History

2015-01-28 09:58:43 +00:00
#!/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);