Skip to content

Instantly share code, notes, and snippets.

@unwriter
Created January 26, 2019 04:19
Show Gist options
  • Save unwriter/758a398cea71a7e6aaf3bc919c4a4d3b to your computer and use it in GitHub Desktop.
Save unwriter/758a398cea71a7e6aaf3bc919c4a4d3b to your computer and use it in GitHub Desktop.
Nemo

Nemo: A hypothetical Memo.cash migration to Bitcom Decentralized Protocol Prefix Scheme

This is a thought experiment to see how an application protocol like Memo.cash could migrate to using the Bitcom decentralized prefix scheme.

Step 1. Generate a keypair

bit init

Step 2. Register a blank App

bit useradd

which sends the following OP_RETURN (Note: all in UTF8) thereby registering the app on the Bitcoin blockchain:

OP_RETURN $ useradd [ADDRESS]

Step 3. Add metadata files

bit echo nemo to name
bit echo https://nemo.cash to website

which creates the following OP_RETURN:

OP_RETURN $ echo nemo to name
OP_RETURN $ echo https://nemo.cash to website

Step 4. Use

memo.cash uses 2 byte prefixes starting with 0x6d, such as:

OP_RETURN 0x6d01 Johndoe
OP_RETURN 0x6d02 Hello

With the new Nemo scheme, assuming that the generated address was 17yyXL4raLZFU95ixkRESa2ZBPSSYxSsS5, it would be:

OP_RETURN 17yyXL4raLZFU95ixkRESa2ZBPSSYxSsS5 0x01 Johndoe
OP_RETURN 17yyXL4raLZFU95ixkRESa2ZBPSSYxSsS5 0x02 Hello

The only thing that's changed is:

  1. Added the address as prefix
  2. stripped out the 6d because the address will uniquely identify the protocol from now on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment