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 jsonwebtoken = require('jsonwebtoken'); | |
const bs58check = require('bs58check'); | |
const EC = require('elliptic').ec; | |
const ec = new EC('secp256k1'); | |
const KeyEncoder = require('key-encoder').default; | |
/** | |
* Thank you to https://github.com/mattetre/bitclout-jwt-validate/blob/main/index.js | |
* @param {String} publicKey | |
* @param {String} jwt |
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
// Do `npm i elliptic sha256` before hand | |
const EC = require('elliptic').ec; | |
const sha256 = require('sha256'); | |
function seedHexToPrivateKey(seedHex) { | |
const ec = new EC('secp256k1'); | |
return ec.keyFromPrivate(seedHex); | |
} |
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 os | |
import fnmatch | |
import zipfile | |
import StringIO | |
import csv | |
print('Scanning for files ...') | |
count = 0 | |
for r, d, f in os.walk(os.path.dirname(os.path.abspath(__file__))): | |
for fn in fnmatch.filter(f, '*.zip'): |