UNPKG

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