Class RocksStore<V>

Store based on rocksdb

Implements

Type Parameters

  • V

Hierarchy

  • RocksStore

Implements

Constructors

  • Creates an instance of RocksStore.

    Memberof

    RocksStore

    Type Parameters

    • V

    Parameters

    • db: LevelUp<AbstractLevelDOWN<any, any>, AbstractIterator<any, any>>
    • eltTyp: Provable<V>
    • smtName: string

    Returns RocksStore<V>

Properties

batch: LevelUpChain<any, any>
db: LevelUp<AbstractLevelDOWN<any, any>, AbstractIterator<any, any>>
eltTyp: Provable<V>
leavesKey: string
nodesKey: string

Methods

  • Use the commit() method to actually submit all prepare changes.

    Returns

    {Promise}

    Memberof

    RocksStore

    Returns Promise<void>

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

    Returns

    {Promise<Field[]>}

    Memberof

    RocksStore

    Parameters

    • key: Field

    Returns Promise<Field[]>

  • Get the tree root. Error is thrown when the root does not exist.

    Returns

    {Promise}

    Memberof

    RocksStore

    Returns Promise<Field>

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

    Returns

    {Promise}

    Memberof

    RocksStore

    Parameters

    • path: Field

    Returns Promise<V>

  • Get values map, key is Field.toString().

    Returns

    {Promise<Map<string, V>>}

    Memberof

    RocksStore

    Returns Promise<Map<string, V>>

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

    Memberof

    RocksStore

    Parameters

    • path: Field

    Returns void

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

    Memberof

    RocksStore

    Parameters

    • key: Field
    • value: Field[]

    Returns void

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

    Memberof

    RocksStore

    Parameters

    • path: Field
    • value: V

    Returns void

  • Protected

    Convert value string to a value of FieldElements type.

    Returns

    {V}

    Memberof

    RocksStore

    Parameters

    • valueStr: string
    • eltTyp: Provable<V>

    Returns V

  • Protected

    Serialize the value of the FieldElements type into a string

    Returns

    {string}

    Memberof

    RocksStore

    Parameters

    • value: V

    Returns string

Generated using TypeDoc