UNPKG

565 BTypeScriptView Raw
1import type { HexString } from '@polkadot/util/types';
2import type { Keypair } from '../types';
3/**
4 * @name ed25519Sign
5 * @summary Signs a message using the supplied secretKey
6 * @description
7 * Returns message signature of `message`, using the `secretKey`.
8 * @example
9 * <BR>
10 *
11 * ```javascript
12 * import { ed25519Sign } from '@polkadot/util-crypto';
13 *
14 * ed25519Sign([...], [...]); // => [...]
15 * ```
16 */
17export declare function ed25519Sign(message: HexString | Uint8Array | string, { publicKey, secretKey }: Partial<Keypair>, onlyJs?: boolean): Uint8Array;