UNPKG

529 BTypeScriptView Raw
1import type { Keypair } from '../../types';
2/**
3 * @name ed25519PairFromSeed
4 * @summary Creates a new public/secret keypair from a seed.
5 * @description
6 * Returns a object containing a `publicKey` & `secretKey` generated from the supplied seed.
7 * @example
8 * <BR>
9 *
10 * ```javascript
11 * import { ed25519PairFromSeed } from '@polkadot/util-crypto';
12 *
13 * ed25519PairFromSeed(...); // => { secretKey: [...], publicKey: [...] }
14 * ```
15 */
16export declare function ed25519PairFromSeed(seed: Uint8Array, onlyJs?: boolean): Keypair;