Class AbstractStorageAbstract

Description

Abstract class representing async key-value storage

Hierarchy

Constructors

Methods

  • Method to clear all key-value storage

    Returns

    Boolean indicating whether operation was successful

    Returns Promise<boolean>

  • Method to get all keys from storage

    Returns

    Strings array with all the keys

    Parameters

    • key: string

    Returns Promise<boolean>

  • Method to get all keys from storage

    Returns

    Strings array with all the keys

    Returns Promise<string[]>

  • Method to read arbitrary bytes by key

    Parameters

    • key: string

      Key to retrieve

    Returns Promise<null | Uint8Array>

  • Method to read object by key

    Type Parameters

    • T

    Parameters

    • key: string

      Key to retrieve

    Returns Promise<null | T>

  • Method to read string by key

    Parameters

    • key: string

      Key to retrieve

    Returns Promise<null | string>

  • Method to store arbitrary bytes array

    Parameters

    • key: string

      Key for indexation

    • bytes: Uint8Array

    Returns Promise<boolean>

  • Method to store arbitrary serializeable object

    Parameters

    • key: string

      Key for indexation

    • val: any

    Returns Promise<boolean>

  • Method to store arbitrary string

    Parameters

    • key: string

      Key for indexation

    • str: string

      Value to store

    Returns Promise<boolean>

Generated using TypeDoc