Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/mod.ts>utilCrypto.mnemonicValidate

Package publishing for deno.land/x/polkadot
Latest
function utilCrypto.mnemonicValidate
import { utilCrypto } from "https://deno.land/x/polkadot@0.2.45/mod.ts";
const { mnemonicValidate } = utilCrypto;

Examples

import { mnemonicGenerate, mnemonicValidate } from 'https://deno.land/x/polkadot@0.2.45/util-crypto/mod.ts';

const mnemonic = mnemonicGenerate(); // => string
const isValidMnemonic = mnemonicValidate(mnemonic); // => boolean

Parameters

mnemonic: string
optional
wordlist: string[]
optional
onlyJs: boolean

Returns

boolean