https://github.com/tradle/testnet-charger
get testnet bitcoins from a faucet and distribute to an arbitrary number of addresses
https://github.com/tradle/testnet-charger
Last synced: about 1 year ago
JSON representation
get testnet bitcoins from a faucet and distribute to an arbitrary number of addresses
- Host: GitHub
- URL: https://github.com/tradle/testnet-charger
- Owner: tradle
- License: mit
- Created: 2015-03-18T18:51:13.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-29T23:37:23.000Z (about 11 years ago)
- Last Synced: 2025-03-28T11:51:09.083Z (about 1 year ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 3
- Watchers: 8
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Testnet charger
Prevent testnet faucet abuse by withdrawing once and then distributing the funds among addresses in wallet
## Usage
```js
var Charger = require('testnet-charger')
var c = new Charger(wallet) // wallet is instance of github.com/tradle/cb-wallet
c.charge(wallet.getNextAddress(1), 1000)
c.charge(wallet.getNextAddress(2), 1042)
c.charge(wallet.getNextAddress(3), 2378)
// optional: c.setFaucet(Charger.faucets.RoyalForkBlog)
c.execute(function(err) {
if (!err) {
console.log('Withdrew TBTC from faucet and distributed to specified addresses')
}
})
````