UNPKG

@okxweb3/crypto-lib

Version:

A base package for @okxweb3/coin-*

24 lines (23 loc) 1.29 kB
/// <reference types="node" /> export declare function ed25519MulBase(scalar: Uint8Array): any; export declare function sign(message: Uint8Array | Buffer, secretKey: Uint8Array | Buffer): Uint8Array; export declare function verify(message: Uint8Array | Buffer, signature: Uint8Array | Buffer, publicKey: Uint8Array | Buffer): boolean; export declare function publicKeyCreate(secretKey: Uint8Array | Buffer): Uint8Array; export declare function publicKeyVerify(pubkey: Uint8Array | Buffer): any; export declare function privateKeyVerify(seckey: Uint8Array | Buffer): boolean; export declare function fromSeed(seed: Uint8Array | Buffer): { publicKey: Uint8Array; secretKey: Uint8Array; }; export declare function fromSecret(secretKey: Uint8Array | Buffer): { publicKey: Uint8Array; secretKey: Uint8Array; }; export declare function ed25519SignTest(privateKey: Buffer): boolean; export declare function ed25519_getRandomPrivateKey(concatPub: boolean, encode: "hex" | "base58"): string; export declare const isValidPath: (path: string) => boolean; export type DerivePriKeyParams = { mnemonic: string; hdPath: string; }; export declare function ed25519_getDerivedPrivateKey(mnemonic: string, hdPath: string, concatPub: boolean, encode: 'hex' | 'base58'): Promise<string>;