Reference https://github.com/SpendBCH/bch-stresstest for a more complete sample and usage notes
This file contains 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
const SLPSDK = require('slp-sdk') | |
const SLP = new SLPSDK() | |
const compressedWif = '' | |
let ecPair = SLP.ECPair.fromWIF(compressedWif) | |
let cashAddress = SLP.ECPair.toCashAddress(ecPair) | |
console.log(cashAddress) |