Skip to content

Instantly share code, notes, and snippets.

View yusufidimaina9989's full-sized avatar

Yusuf Idi Maina yusufidimaina9989

View GitHub Profile
@xhliu
xhliu / deriveAddress.js
Last active January 9, 2024 08:52
A simple demo for derived bitcoin addresses
// Copyright (c) 2020 Xiaohui Liu.
// Use of this source code is governed by a MIT-style license.
// This is an implementation of https://craigwright.net/blog/bitcoin-blockchain-tech/offline-addressing
// For more info, also see Episode 4 of Bitcoin Class with Satoshi: Extended Address https://youtu.be/rezvcJ4j-7U
const bsv = require('bsv');
const BN = bsv.crypto.BN
const Hash = bsv.crypto.Hash
const G = bsv.crypto.Point.getG()
const N = bsv.crypto.Point.getN()