This commit is contained in:
Josh Harvey 2016-04-04 16:19:41 +01:00
parent 591ffcf162
commit 22c2acfe61
3 changed files with 26 additions and 6 deletions

View file

@ -8,12 +8,7 @@ BigNumber.config({DECIMAL_PLACES: 40})
exports.NAME = 'Kraken'
exports.SUPPORTED_MODULES = ['ticker']
// var pluginConfig = {}
// https://bitpay.com/api/rates
exports.config = function config (localConfig) {
// pluginConfig = localConfig
}
function findCurrency (fxRates, currency) {

25
lib/plugins/web3.js Normal file
View file

@ -0,0 +1,25 @@
var Web3 = require('web3')
var web3 = new Web3()
if (!web3.isConnected()) {
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'))
}
// Note: it's still called sendBitcoins for backwards compatibility, but this
// is for any currency
exports.sendBitcoins = function sendBitcoins (address, satoshis, fee, callback) {
web3.eth.sendTransaction({
to: address,
value: satoshis
}, callback)
}
exports.balance = function balance (cb) {
var coinbase = web3.eth.coinbase
web3.eth.getBalance(coinbase, 'pending', cb)
}
exports.newAddress = function newAddress (info, callback) {
throw new Error('Not implemented')
}

View file

@ -13,8 +13,8 @@
"axios": "^0.9.1",
"bignumber.js": "^2.3.0",
"bluebird": "^3.3.4",
"bunyan": "~0.22.3",
"es6-promise": "^3.1.2",
"ethereumjs-wallet": "^0.5.1",
"express": "~3.4.7",
"inquirer": "^0.8.0",
"joi": "^5.1.0",