Skip to content

Instantly share code, notes, and snippets.

@jazzyjackson
Created April 26, 2021 06:37
Show Gist options
  • Save jazzyjackson/e603cebc78f2e6f3bd80e803d2867ce7 to your computer and use it in GitHub Desktop.
Save jazzyjackson/e603cebc78f2e6f3bd80e803d2867ce7 to your computer and use it in GitHub Desktop.
function printOurSailor(allPublicKeys, candidatesSeed){
for(var candidateSeed of candidatesSeed){
let keychain = this.CryptoService.mnemonicToKeychain(candidateSeed)
let seedHex = this.CryptoService.keychainToSeedHex(keychain)
let privateKey = this.CryptoService.seedHexToPrivateKey(seedHex)
let publicKey = this.CryptoService.privateKeyToBitcloutPublicKey(privateKey, "mainnet")
if(allPublicKeys.has(publicKey)){
console.log("Our sailor is" + publicKey + " mnemonic: " + candidateSeed)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment