UNPKG

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