WIP
This commit is contained in:
parent
591ffcf162
commit
22c2acfe61
3 changed files with 26 additions and 6 deletions
|
|
@ -8,12 +8,7 @@ BigNumber.config({DECIMAL_PLACES: 40})
|
||||||
exports.NAME = 'Kraken'
|
exports.NAME = 'Kraken'
|
||||||
exports.SUPPORTED_MODULES = ['ticker']
|
exports.SUPPORTED_MODULES = ['ticker']
|
||||||
|
|
||||||
// var pluginConfig = {}
|
|
||||||
|
|
||||||
// https://bitpay.com/api/rates
|
|
||||||
|
|
||||||
exports.config = function config (localConfig) {
|
exports.config = function config (localConfig) {
|
||||||
// pluginConfig = localConfig
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function findCurrency (fxRates, currency) {
|
function findCurrency (fxRates, currency) {
|
||||||
|
|
|
||||||
25
lib/plugins/web3.js
Normal file
25
lib/plugins/web3.js
Normal 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')
|
||||||
|
}
|
||||||
|
|
@ -13,8 +13,8 @@
|
||||||
"axios": "^0.9.1",
|
"axios": "^0.9.1",
|
||||||
"bignumber.js": "^2.3.0",
|
"bignumber.js": "^2.3.0",
|
||||||
"bluebird": "^3.3.4",
|
"bluebird": "^3.3.4",
|
||||||
"bunyan": "~0.22.3",
|
|
||||||
"es6-promise": "^3.1.2",
|
"es6-promise": "^3.1.2",
|
||||||
|
"ethereumjs-wallet": "^0.5.1",
|
||||||
"express": "~3.4.7",
|
"express": "~3.4.7",
|
||||||
"inquirer": "^0.8.0",
|
"inquirer": "^0.8.0",
|
||||||
"joi": "^5.1.0",
|
"joi": "^5.1.0",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue