UNPKG

@fioprotocol/fiosdk

Version:

The Foundation for Interwallet Operability (FIO) is a consortium of leading blockchain wallets, exchanges and payments providers that seeks to accelerate blockchain adoption by reducing the risk, complexity, and inconvenience of sending and receiving cryp

24 lines (18 loc) 877 B
const fio = require('@fioprotocol/fiosdk'); const mnemonic = 'valley alien library bread worry brother bundle hammer loyal barely dune brave' async function genKeysFromMnemonic () { console.log("") console.log("From This Mnemonic:") console.log(mnemonic) console.log("") // Private key generation in the SDK is available for testing purposes only. Do not generate private keys for production application using these methods. Instead pass securely generated private keys or seed phrase to the SDK constructor. const privateKeyRes = await fio.FIOSDK.createPrivateKeyMnemonic(mnemonic) console.log("Private key generated:") console.log((privateKeyRes.fioKey)) console.log("") const publicKeyRes = fio.FIOSDK.derivedPublicKey(privateKeyRes.fioKey) console.log("Public key generated:") console.log((publicKeyRes.publicKey)) console.log("") } genKeysFromMnemonic()