UNPKG

@polkadot/wasm-crypto

Version:

A wasm interface layer for use by @polkadot/util-crypto

38 lines (37 loc) 3.1 kB
import { bridge } from './init.js'; export { packageInfo } from './packageInfo.js'; export { bridge }; export declare const bip39Generate: (words: 12 | 15 | 18 | 21 | 24) => string; export declare const bip39ToEntropy: (phrase: string) => Uint8Array; export declare const bip39ToMiniSecret: (phrase: string, password: string) => Uint8Array; export declare const bip39ToSeed: (phrase: string, password: string) => Uint8Array; export declare const bip39Validate: (phrase: string) => boolean; export declare const ed25519KeypairFromSeed: (seed: Uint8Array) => Uint8Array; export declare const ed25519Sign: (pubkey: Uint8Array, seckey: Uint8Array, message: Uint8Array) => Uint8Array; export declare const ed25519Verify: (signature: Uint8Array, message: Uint8Array, pubkey: Uint8Array) => boolean; export declare const secp256k1FromSeed: (seckey: Uint8Array) => Uint8Array; export declare const secp256k1Compress: (pubkey: Uint8Array) => Uint8Array; export declare const secp256k1Expand: (pubkey: Uint8Array) => Uint8Array; export declare const secp256k1Recover: (msgHash: Uint8Array, sig: Uint8Array, recovery: number) => Uint8Array; export declare const secp256k1Sign: (msgHash: Uint8Array, seckey: Uint8Array) => Uint8Array; export declare const sr25519DeriveKeypairHard: (pair: Uint8Array, cc: Uint8Array) => Uint8Array; export declare const sr25519DeriveKeypairSoft: (pair: Uint8Array, cc: Uint8Array) => Uint8Array; export declare const sr25519DerivePublicSoft: (pubkey: Uint8Array, cc: Uint8Array) => Uint8Array; export declare const sr25519KeypairFromSeed: (seed: Uint8Array) => Uint8Array; export declare const sr25519Sign: (pubkey: Uint8Array, secret: Uint8Array, message: Uint8Array) => Uint8Array; export declare const sr25519Verify: (signature: Uint8Array, message: Uint8Array, pubkey: Uint8Array) => boolean; export declare const sr25519Agree: (pubkey: Uint8Array, secret: Uint8Array) => Uint8Array; export declare const vrfSign: (secret: Uint8Array, context: Uint8Array, message: Uint8Array, extra: Uint8Array) => Uint8Array; export declare const vrfVerify: (pubkey: Uint8Array, context: Uint8Array, message: Uint8Array, extra: Uint8Array, outAndProof: Uint8Array) => boolean; export declare const blake2b: (data: Uint8Array, key: Uint8Array, size: number) => Uint8Array; export declare const hmacSha256: (key: Uint8Array, data: Uint8Array) => Uint8Array; export declare const hmacSha512: (key: Uint8Array, data: Uint8Array) => Uint8Array; export declare const keccak256: (data: Uint8Array) => Uint8Array; export declare const keccak512: (data: Uint8Array) => Uint8Array; export declare const pbkdf2: (data: Uint8Array, salt: Uint8Array, rounds: number) => Uint8Array; export declare const scrypt: (password: Uint8Array, salt: Uint8Array, log2n: number, r: number, p: number) => Uint8Array; export declare const sha256: (data: Uint8Array) => Uint8Array; export declare const sha512: (data: Uint8Array) => Uint8Array; export declare const twox: (data: Uint8Array, rounds: number) => Uint8Array; export declare function isReady(): boolean; export declare function waitReady(): Promise<boolean>;