Class LevelStore<V>

Store based on leveldb

LevelStore

Implements

Type Parameters

  • V

Implements

Constructors

Properties

db: Level<string, any>
eltTyp: Provable<V>
leavesSubLevel: AbstractSublevel<Level<string, any>, string | Buffer | Uint8Array, string, string>
nodesSubLevel: AbstractSublevel<Level<string, any>, string | Buffer | Uint8Array, string, string>
operationCache: (AbstractBatchPutOperation<Level<string, any>, string, any> | AbstractBatchDelOperation<Level<string, any>, string>)[]

Methods

  • Get nodes for a key. Error is thrown when a key that does not exist is being accessed.

    Parameters

    • key: Field

    Returns Promise<Field[]>

    {Promise<Field[]>}

    Memberof

    LevelStore

  • Get the value for a key. Error is thrown when a key that does not exist is being accessed.

    Parameters

    • path: Field

    Returns Promise<V>

    {Promise}

    Memberof

    LevelStore

  • Prepare put nodes for a key. Use the commit() method to actually submit changes.

    Parameters

    • key: Field
    • value: Field[]

    Returns void

    Memberof

    LevelStore

  • Protected

    Convert value string to a value of FieldElements type.

    Parameters

    • valueStr: string
    • eltTyp: Provable<V>

    Returns V

    {V}

    Memberof

    LevelStore

  • Protected

    Serialize the value of the FieldElements type into a string

    Parameters

    • value: V

    Returns string

    {string}

    Memberof

    LevelStore