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
import * as secp from '@noble/secp256k1' | |
import ripemd160 from 'ripemd160-js/ripemd160.mjs' | |
import * as sha3 from 'js-sha3' | |
import { createHash } from 'node:crypto' | |
import { binary_to_base58 } from 'base58-js' | |
// Generate public key for private key of number 1 (or any number between 1 and ~10^77) | |
const privateKey = Buffer.alloc(32) | |
privateKey.writeUInt8(0x1, 31) |