Skip to content

generateKeypairs

generateKeypairs(mnemonic, keytype?): ICordKeyPair

This function takes a mnemonic, creates an account from the mnemonic, and then derives four keypairs from the account

Parameters

mnemonic: string

A string of words that can be used to recover the keypairs.

keytype?: string

type of key to generate, supports ‘ed25519’ (default) and ‘sr25519’ for now

Returns

ICordKeyPair

An object with 4 keyring pairs.

Source

utils/src/Keys.ts:38