Skip to content

Instantly share code, notes, and snippets.

View tynes's full-sized avatar
👽
take me to your leader

Mark Tyneway tynes

👽
take me to your leader
View GitHub Profile
@tynes
tynes / name-claim.md
Last active March 28, 2023 16:54
Domain Name Claiming for Handshake

Handshake Domain Name Claims

The Handshake Network has reserved the Alexa Top 100k domains on chain to make sure that important brands are able to own their name in the system. These names can be claimed using a DNSSEC proof of ownership. This means that the owner of the domain name must place a TXT record at their domain name that includes a controlled address.

For technical instructions, see:

@tynes
tynes / dexec.sh
Created May 17, 2018 22:15
docker exec bash alias
# usage:
# dexec <cmd>
# uses fzf to select running container then runs
# $ docker run [selected] <cmd>
# with /bin/bash as the default cmd
# TODO: add some pretty printing
function dexec() {
local selected_image
@tynes
tynes / opti-geth-diff.sh
Created September 24, 2021 00:00
View the geth diff
#/bin/bash
# view a diff based on a branch that recreates the strucutre
# of actual geth
git clone git@github.com:ethereum-optimism/optimism.git
cd optimism
git checkout only-l2geth

Handshake Airdrop

The airdrop is based on the paper An airdrop that preserves recipient privacy.

To claim the airdrop, you needed to have at least 15 followers on Github as of ~2 years ago and an ssh or gpg key linked to your Github account. You will need to download hsd to create an address and have access to the key linked to your Github account.

It is an easy process with 3 terminals. If you prefer to use a GUI, see Bob.

# set an env var to the path to a config
export REGTEST_CONFIG=$HOME/.config/hsd/regtest.conf
# this assumes you have git cloned and npm installed handshake
# be sure to start your handshake node with the same config
# ./bin/hsd --config=$REGTEST_CONFIG
# the cli tools live in node_modules/.bin
# also depends on jq
@tynes
tynes / attack.js
Last active August 10, 2020 16:40
quick urkel tree test
const bcrypto = require('bcrypto');
const random = require('bcrypto/lib/random');
const BN = require('bcrypto/lib/bn.js');
const urkel = require('urkel/radix');
//const urkel = require('urkel/trie');
const {BLAKE2b} = bcrypto;
const {randomBytes} = random;
const {Tree, Proof} = urkel;
const dir = process.cwd();
@tynes
tynes / hsd-auction-scan.js
Created May 26, 2020 17:52
Scan the Handshake Blockchain for Outputs Related to an Auction
const {NodeClient} = require('hs-client');
const sha3 = require('bcrypto/lib/sha3');
const TX = require('hsd/lib/primitives/tx');
const client = new NodeClient({
host: '127.0.0.1',
port: 12037
});
(async () => {
@tynes
tynes / music-reveal.md
Created May 21, 2020 19:02
.music reveal tx
{
  "hash": "30f4c0b5832e8a86231f04d9be0820c6df0f6da3be7ba44b0d92a0469b0c30e8",
  "witnessHash": "5cb8a7eeecc50a159516827d3f006176568859402bacca21a0ed42fd53f647f0",
  "mtime": 1589852464,
  "version": 0,
  "inputs": [
    {
      "prevout": {
        "hash": "0090099cae23b7c7b877f7391782e8fe3ba0a94c61251ad9e192506ff719b20d",
@tynes
tynes / ens.json
Created May 13, 2020 20:36
ENS Name Claim and Register
{
"outputs": [
{
"outpoint": {
"hash": "87109e75e6b28cb2d4695fab9f2c091d894840b28aaa961528f64dc838b181c4",
"index": 1
},
"output": {
"value": 136503385487,
"address": "hs1q9rpvmy58x6alnry6u0fy6zfd9fsq3sstcev9g0",
@tynes
tynes / D3CD8BD764ACE995.txt
Created April 30, 2020 18:53
tynes pubkey
-----BEGIN PGP PUBLIC KEY BLOCK-----
mFIEXnlZUhMIKoZIzj0DAQcCAwQhuVLb3ZGRJ/EpcvO/02F1PNpcuT6tIw5BhHdt
xc97gENYp6XrhtemC51M6/igxITiSIhwRvUjuVenVo/fww6RtCVNYXJrIFR5bmV3
YXkgPG1hcmsudHluZXdheUBnbWFpbC5jb20+iIAEExMIABwFAl55WVICCwkCGwME
FQgJCgQWAgMBAheAAh4BABYJENPNi9dkrOmVCxpUUkVaT1ItR1BHrDoA/00pjZ58
d0DoAmQs8Qnytkwyiewk+l5gUwGGgL1PzXj1AP9VPARuoWOMMlxItVExaTmD0y6e
a1rc21ANUAoBa53T77hWBF55WVISCCqGSM49AwEHAgME+UsSeTWeDdE1MJjJwZKS
xGHLkzRp5gcL9i1qETII3mVAQwIx+vZ/vn2XsXGBgLSoGQLIEDix8wKPbc77G8MR
LQMBCAeIbQQYEwgACQUCXnlZUgIbDAAWCRDTzYvXZKzplQsaVFJFWk9SLUdQR+4Q