use BlockTrail for testnet faucet
This commit is contained in:
parent
5ce093739e
commit
c3a3f17ef0
2 changed files with 12 additions and 6 deletions
test/integration
|
@ -1,10 +1,15 @@
|
|||
var https = require('https')
|
||||
var httpify = require('httpify')
|
||||
|
||||
function faucetWithdraw (address, amount, done) {
|
||||
var url = 'https://coconut-macaroon.herokuapp.com/withdrawal?address=' + address + '&amount=' + amount
|
||||
https.get(url, function (res) {
|
||||
res.statusCode === 200 ? done(null) : done(new Error('non-200 status: ' + res.statusCode))
|
||||
}).on('error', done)
|
||||
function faucetWithdraw (address, amount, callback) {
|
||||
httpify({
|
||||
method: 'POST',
|
||||
url: 'https://api.blocktrail.com/v1/tBTC/faucet/withdrawl?api_key=c0bd8155c66e3fb148bb1664adc1e4dacd872548',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
address: address,
|
||||
amount: amount
|
||||
})
|
||||
}, callback)
|
||||
}
|
||||
|
||||
function pollUnspent (blockchain, address, done) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue