For a deep dive into the mechanics of the faucet, airdrop and claims, read this article.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const assert = require('assert'); | |
const path = require('path'); | |
const fs = require('fs'); | |
const os = require('os'); | |
const {Chain, Pool} = require('hsd'); | |
const NetAddress = require('hsd/lib/net/netaddress'); | |
const Logger =require('hsd/node_modules/blgr'); | |
const IP =require('hsd/node_modules/binet'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const {NodeClient, WalletClient} = require('hs-client'); | |
const {Network} = require('hsd'); | |
const network = Network.get('regtest'); | |
const nodeOptions = { | |
network: network.type, | |
port: network.rpcPort | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// USAGE: hsd --log-console=false --plugins=/path/to/this/file/addr-bal.js | |
'use strict'; | |
const {CoinEntry} = require('hsd'); | |
const layout = require('hsd/lib/blockchain/layout'); | |
const plugin = exports; | |
class Plugin { | |
constructor(node) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// USAGE: hsd --log-console=false --plugins=/path/to/this/file/expiring-plug.js | |
'use strict'; | |
const { | |
Namestate, | |
Network | |
} = require('hsd'); | |
const plugin = exports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const {NodeClient} = require('hs-client'); | |
const {Network} = require('hsd'); | |
const network = Network.get('main'); | |
const clientOptions = { | |
network: network.type, | |
port: network.rpcPort | |
} |
Introduce new covenant types and backwards-compatible rules for miners in order to collectively generate a deterministic yet unpredictable random value over a period of time. This scheme relies on the assumption that miners are diverse (decentralized) and are competitive against each other, not collaborating with each other.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const assert = require('assert'); | |
const {SPVNode, Namestate, Rules, resource} = require('hsd'); | |
const argv = process.argv; | |
assert(argv.length === 3, 'Usage:\n $ node zooko-spv.js <name>'); | |
assert(Rules.verifyName(argv[2], 'Invalid name.')); | |
const nameHash = Rules.hashName(argv[2]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const fs = require('fs'); | |
const os = require('os'); | |
const Path = require('path'); | |
const hdns = require('hdns'); | |
const {encoding} = require('hdns/node_modules/bcrypto'); | |
const {pem} = encoding; | |
const host = process.argv[2]; |
https://github.com/bcoin-org/bcoin/releases/tag/v2.2.0
Be sure to read and understand the upgrade details in CHANGELOG
IF YOU USE THE ADDRESS INDEXER you will need to delete and rebuild that database, which could take 24-48 hours depending on your machine:
- Stop bcoin (
bcoin-cli rpc stop
orctrl-C
)