Skip to content

Instantly share code, notes, and snippets.

View marceloneil's full-sized avatar

Marcel O'Neil marceloneil

View GitHub Profile
@marceloneil
marceloneil / hackathons.txt
Last active April 18, 2020 16:29
Hackathons
2015 (4)
Tech Retreat
Get Your Bot On!
Local Hack Day
Hack Western
2016 (11)
Hack The 6ix 3rd
UofTHacks Top 10
NHacks
@marceloneil
marceloneil / index.js
Created November 29, 2020 21:50
Change xpub prefix
const bs58 = require('bs58')
const shajs = require('sha.js')
const start = "xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8"
const startBuf = bs58.decode(start)
// overwrite with new base58 key prefix. these prefixes can be found in chainparams.cpp for bitcoin forks:
// https://github.com/bitcoin/bitcoin/blob/7ae86b3c6845873ca96650fc69beb4ae5285c801/src/chainparams.cpp#L134
// https://github.com/dogecoin/dogecoin/blob/0b46a40ed125d7bf4b5a485b91350bc8bdc48fc8/src/chainparams.cpp#L170
const prefix = Buffer.from("02facafd", "hex")