Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Zipkin pinheadmz

  • port 8333
View GitHub Profile
View DHTNS.txt
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.
View urkel.txt
┌─────────────────────────────────────────────────────────────────────────────┐
│2 LEAF { │
│ bits: '00110101', │
View gateway-multisig-policy.md

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
View ms-bob-windows.md

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:

View prove-node.js
'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');
View fill-tree.js
'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
};
View transfer-address.js
'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];
View addr-bal.js
// 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) {
View expiring-plugin.js
// USAGE: hsd --log-console=false --plugins=/path/to/this/file/expiring-plug.js
'use strict';
const {
Namestate,
Network
} = require('hsd');
const plugin = exports;
View hsd-peerstats.js
'use strict';
const {NodeClient} = require('hs-client');
const {Network} = require('hsd');
const network = Network.get('main');
const clientOptions = {
network: network.type,
port: network.rpcPort
}