Interface IKeyManager

Key provider

Hierarchy

  • IKeyManager

Methods

  • Generate a new key (entropy of phrase)

    Parameters

    • Optional wordsLength: number

      number of words (default is 24), the words length should be from 12 to 24

    Returns Uint8Array

  • Get a word at a specific index of the given entropy. If the index is not available, undefined will be returned

    Parameters

    • entropy: Hex
    • index: number
    • encode: boolean

    Returns string

  • Convert the readable key to entropy value

    Parameters

    • key: string[]
    • Optional encoded: boolean

    Returns Uint8Array

  • Convert the readable key to entropy value async

    Parameters

    • key: string[]
    • Optional encoded: boolean

    Returns Promise<Uint8Array>

  • Convert the entropy value to readable key

    Parameters

    • entropy: Hex
    • Optional encode: boolean

      to encode each word of key

    Returns string[]

  • Convert the entropy value to readable key async

    Parameters

    • entropy: Hex
    • Optional encode: boolean

      to encode each word of key

    Returns Promise<string[]>

  • Convert the entropy of key to heximal seed

    Parameters

    • entropy: Uint8Array
    • Optional password: string

      optional password to protect seed key

    Returns string

  • Convert the entropy of key to Uint8Array array seed

    Parameters

    • entropy: Uint8Array
    • Optional password: string

      optional password to protect seed key

    Returns Uint8Array

  • Convert the entropy of key to Uint8Array array seed async

    Parameters

    • entropy: Uint8Array
    • Optional password: string

      optional password to protect seed key

    Returns Promise<Uint8Array>

  • Convert the entropy of key to heximal seed async

    Parameters

    • entropy: Uint8Array
    • Optional password: string

      optional password to protect seed key

    Returns Promise<string>

  • Validate the given key

    Parameters

    • key: string[]
    • Optional encoded: boolean

      indicates that each word in key is encoded

    Returns boolean

Generated using TypeDoc