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 {NodeClient} = require('hs-client'); | |
const {Network} = require('hsd'); | |
const network = Network.get('main'); | |
const clientOptions = { | |
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
'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]); |
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
)
Claim a Handshake reserved name: ICANN TLD using HSM for DNSSEC signing (e.g. with CentralNic)
Demonstration with Bob Wallet: https://youtu.be/32Oi65rhdfE?t=886
- Install Bob Wallet https://bobwallet.io/
- Must be at least version 0.9.0, due for release in November 2021
- Launch Bob Wallet, it may take a few hours and around 20 GB of disk space to complete blockchain sync.
- Create a new wallet one of two ways:
- Let Bob generate seed phrase, you MUST write it down and keep that backup safe
- Use a Ledger hardware wallet (demonstration: https://www.youtube.com/watch?v=CJCCE7enL2E)
To start you need a master private key. For me, the easiest way to do this is with bcoin and its default wallet in regtest mode:
$ bwallet-cli mkwallet --mnemonic='zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong' --id=zoo
$ bwallet-cli --id=zoo master
{
"encrypted": false,
"key": {
"xprivkey": "tprv8ZgxMBicQKsPdCttbKDzsuDzypKyWMDfGbzR5YsQe3dnPg6B69PPEaxawUuaanULMtgA8Etd9DaqDVSEBSbScA9xTsdR8PRfPsJZwKS3dJQ"
},
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 path = require('path'); | |
const readline = require('readline'); | |
(async () => { | |
const DIR = process.argv[2]; | |
if (!DIR) |
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
diff --git a/lib/hd/hd.js b/lib/hd/hd.js | |
index d284171ef..0ca02ec3c 100644 | |
--- a/lib/hd/hd.js | |
+++ b/lib/hd/hd.js | |
@@ -58,12 +58,12 @@ HD.fromSeed = function fromSeed(options) { | |
/** | |
* Instantiate an hd private key from a mnemonic. | |
* @param {Mnemonic} mnemonic | |
- * @param {String?} passphrase | |
+ * @param {String?} bip39Passphrase |
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
#!/usr/bin/env bash | |
time=`date +%s` | |
export HSD_NETWORK=regtest | |
hsd --prefix=~/.hsd/bip39passphrase-test-$time --daemon | |
sleep 2 | |
PHRASE="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" | |
PS="secret123" | |
BIP39PS="menace" |