Skip to content

Instantly share code, notes, and snippets.

View pinheadmz's full-sized avatar
🕺

Matthew Zipkin pinheadmz

🕺
  • port 8333
View GitHub Profile
@pinheadmz
pinheadmz / bitcoind-regtest-taproot-address.md
Last active April 17, 2024 04:53
Use Bitcoin Core in regtest mode to generate a Taproot address

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"
  },

1. Plug in Ledger, open Ledger Live and update device firmware to latest

Screen Shot 2021-07-07 at 9 07 44 AM

2. Go to Settings -> Expirimental Features

Screen Shot 2021-07-07 at 9 07 51 AM

3. Enable "Developer mode"

What is the coin supply of HNS at this moment?

$ hsd-cli info | jq .chain.state
{
  "tx": 1498491,
  "coin": 987885,
  "value": 307706949499305,
  "burned": 8282032802881
}
'use strict';
const {NodeClient} = require('hs-client');
const {Address, Network} = require('hsd');
const network = Network.get('main');
if (process.argv.length !== 3)
throw new Error('Usage:\n node transfer-address.js <NAME>');
const name = process.argv[2];
diff --git a/src/test/data/script_tests.json b/src/test/data/script_tests.json
index ad05240369..e929dc3bff 100644
--- a/src/test/data/script_tests.json
+++ b/src/test/data/script_tests.json
@@ -2620,5 +2620,17 @@
["0 0x09 0x300602010102010101 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "0x01 0x14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0x01 0x14 CHECKMULTISIG NOT", "DERSIG", "OK", "BIP66-compliant but not NULLFAIL-compliant"],
["0 0x09 0x300602010102010101 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "0x01 0x14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0x01 0x14 CHECKMULTISIG NOT", "DERSIG,NULLFAIL", "NULLFAIL", "BIP66-compliant but not NULLFAIL-compliant"],
+[
+ [

Upgrade nodejs to v12.x.x

$ sudo npm install -g n
$ sudo n lts

Install hsd

DHTNS
Key: hash of domain name sld.tld
Value: DNSSEC signed zone file
Nodes host zone files and are incentivized by sld and tld owners to do so using payment channels.
Nodes may host many zone files.
Nodes compute a GCS filter containing all the keys for the zones they host.
┌─────────────────────────────────────────────────────────────────────────────┐
│2 LEAF { │
│ bits: '00110101', │

Gateway Multisig Emergency Keyholder Policy

Setup

HNS TLDs submitted to the Gateway registry are held in a 2-of-3 multisig wallet constructed by these participants:

  1. TLD owner
  2. Gateway
  3. Matthew Zipkin

NOTE: These example commands are for windows shell only and you must be careful to copy/paste them as written, ESPECIALLY the punctuation, and ESPECIALLY the weird double-double quotes around strings like ""default""

Open Bob Wallet, log in, go to settings > wallet > API key and click "view API key". Copy the value, it will look something like this:

21060251f5c7a63fa9b364d756e2f22402278e30

Next, open command prompt (can be found by searching in the windows menu)

Execute this command with your own API key you copied from Bob: