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

x/polkadot/util-crypto/mnemonic/validate.ts>mnemonicValidate

Package publishing for deno.land/x/polkadot
Go to Latest
function mnemonicValidate
import { mnemonicValidate } from "https://deno.land/x/polkadot@0.2.39/util-crypto/mnemonic/validate.ts";

Examples

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

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

Parameters

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

Returns

boolean