Skip to content

Instantly share code, notes, and snippets.

@RichAyotte
Last active April 25, 2019 12:10
Show Gist options
  • Save RichAyotte/4a1c56c4e9638fa7eff34869199b412c to your computer and use it in GitHub Desktop.
Save RichAyotte/4a1c56c4e9638fa7eff34869199b412c to your computer and use it in GitHub Desktop.
Baking Bad Challenge
const {default: Sotez, crypto} = require('sotez')
const sotez = new Sotez('http://127.0.0.1:8732')
const words = [
'eight'
, 'life'
, 'cycle'
, 'hub'
, 'response'
, 'suffer'
, 'useless'
, 'custom'
, 'drama'
, 'baby'
, 'royal'
, 'embrace'
, 'door'
]
const main = async () => {
const { mnemonic, passphrase, sk, pk, pkh } = await crypto.generateKeys(words.join(' '))
const balance = await sotez.getBalance(pkh)
console.log({pkh, balance})
}
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment