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 / swap-script.txt
Last active April 16, 2020 06:33
more simple swap script
New Script
Opcode.fromSymbol('type'),
Opcode.fromInt(rules.types.TRANSFER),
Opcode.fromSymbol('equal'),
Opcode.fromSymbol('if'),
Opcode.fromSymbol('dup'),
Opcode.fromSymbol('blake160'),
Opcode.fromPush(pubkeyhash),

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.

@tynes
tynes / hsd-ens.md
Created February 25, 2020 19:26
hsd ENS Support

Handshake can be used to resolve names with a sliding scale of trust assumptions. In general, the more trust that the user places in the system, the better user experience. The easiest way to resolve Handshake names involves configuring DNS settings and not worrying at all about blockchain state. This means that the user is trusting the DNS service provider to properly validate all state transitions and relying on traditional means of DNS security. Running a light client as a DNS server removes the trust assumption that the name state is coming from the heaviest chain. The light client will sync the headers (technically a subset of the header, designed specifically to be lightweight), verify the proof of work is correct and ask for urkel proofs over the p2p network to validate against the tree root contained in the block header. The p2p connections are optionally encrypted with brontide (BOLT #8)

@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 / dev-call-4-2-2020.md
Created April 2, 2020 17:59
Handshake Developer's Call - 4/2/2020
@tynes
tynes / handshake-utxo.txt
Created April 7, 2020 06:47
structs for handshake utxo
## Output Structuring
In a UTXO-based blockchain, the typical transaction output consists of a
_locking script_, or _predicate_, combined with an output value.
A typical bitcoin output exists as a struct of:
fig. 16
``` c
@tynes
tynes / hsd.sh
Last active April 14, 2020 03:03
debug hsd script
#!/bin/bash
# Run from the root of the gitrepo
# Starts hsd, can pass debug as arg to run with
# debugger.
DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
ROOTDIR=$(echo $(cd $DIR/.. && pwd))
NODE="$ROOTDIR/bin/node"
@tynes
tynes / hsd-auction.sh
Created April 15, 2020 21:41
Bash script for going through an auction
#!/bin/bash
# First argument must be the path to
# the hsd gitrepo, ie ./hsd-auction $PWD/hsd
HSD_="$1/bin/hsd"
HSW_CLI="$1/bin/hsw-cli"
HSD_CLI="$1/bin/hsd-cli"
export HSD_NETWORK=regtest
@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
@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",