UNPKG

585 BTypeScriptView Raw
1import type { Keypair } from '../../types.js';
2/**
3 * @name ed25519PairFromString
4 * @summary Creates a new public/secret keypair from a string.
5 * @description
6 * Returns a object containing a `publicKey` & `secretKey` generated from the supplied string. The string is hashed and the value used as the input seed.
7 * @example
8 * <BR>
9 *
10 * ```javascript
11 * import { ed25519PairFromString } from '@polkadot/util-crypto';
12 *
13 * ed25519PairFromString('test'); // => { secretKey: [...], publicKey: [...] }
14 * ```
15 */
16export declare function ed25519PairFromString(value: string): Keypair;