This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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() |