Skip to content

mnemonic 5.0.24

Install from the command line:
Learn more about npm packages
$ npm install @dusk-network/mnemonic@5.0.24
Install via package.json:
"@dusk-network/mnemonic": "5.0.24"

About this version

Dusk UI Kit - Molecule - Mnemonic

Storybook Docs

Installation

npm i -D @dusk-network/mnemonic

Usage

<script>
  import Mnemonic from "@dusk-network/mnemonic";
  import DropDown from "@dusk-network/drop-down";
  import types from "@dusk-network/helpers/types.js";

  function onComplete(e) {
    console.log(e);
  }
  function onPassed(e) {
    console.log(e);
  }
  const seed = [
    "oyster",
    "close",
    "apple",
    "unfold",
    "wood",
    "alone",
    "during",
    "storm",
    "pulp",
    "glow",
    "album",
    "shop",
  ];
  let type = types.MNEMONIC.PREVIEW;
  const length = 12;
  //Drop-down prop and event are used just to display different Mnemnonic types
  const options = [types.MNEMONIC.PREVIEW, types.MNEMONIC.AUTHENTICATE, types.MNEMONIC.CONFIRM];
  function onSelect(event) {
    type = event.detail;
  }
</script>

<p>Mnemonic type:</p>
<DropDown options="{options}" on:select="{onSelect}" />
<br />
<Mnemonic
  on:complete="{onComplete}"
  on:passed="{onPassed}"
  seed="{seed}"
  type="{type}"
  length="{length}"
/>

Details


Assets

  • mnemonic-5.0.24.tgz

Download activity

  • Total downloads 12
  • Last 30 days 0
  • Last week 0
  • Today 0