β€οΈUnderstanding the Keyring concept
A keyring is a mechanism for managing cryptographic key pairs.
// Import the keyring as required
import { Keyring } from '@polkadot/api';
// Initialize the API as we would normally do
...
// Create a keyring instance
const keyring = new Keyring({ type: 'sr25519' });// Some mnemonic phrase
const PHRASE = 'entire material egg meadow latin bargain dutch coral blood melt acoustic thought';
// Add an account, straight mnemonic
const newPair = keyring.addFromUri(PHRASE);Last updated