A key for encrypting/decrypting data in secret storage

Constructors

Methods

  • The info about the [SecretStorageKey], as an item for storing in account data.

    Returns a JSON-encoded object.

    Returns string

  • Decrypt the given Secret Storage item, given as the JSON-encoded contents.

    Parameters

    • accountDataContentJson: string
    • secretName: string

    Returns string

  • Encrypt a secret string as a Secret Storage secret.

    Returns the JSON-encoded contents to store in Account Data.

    Parameters

    • plaintext: string
    • secretName: string

    Returns string

  • The event type of this [SecretStorageKey] for storing in account data.

    Returns string

  • The unique ID of this [SecretStorageKey].

    Returns string

  • Export the [SecretStorageKey] as a base58-encoded string.

    Returns string

  • Create a new passphrase-based [SecretStorageKey].

    Parameters

    • passphrase: string

    Returns SecretStorageKey

  • Restore a [SecretStorageKey] from the given input and the description of the key.

    The [SecretStorageKeyEventContent] will contain the description of the [SecretStorageKey]. The constructor will check if the provided input string matches to the description.

    The input can be a passphrase or a Base58 export of the [SecretStorageKey].

    Parameters

    • input: string
    • eventType: string
    • content: string

    Returns SecretStorageKey