Skip to main content

@midnight/ledger v3.0.2Readme | API


@midnight/ledger v3.0.2 / StateMap

Class: StateMap

Represents a key-value map, where keys are AlignedValues, and values are StateValues.

Constructors

new StateMap()

new StateMap(): StateMap

Returns

StateMap

Methods

get()

get(key): undefined | StateValue

Parameters

key: AlignedValue

Returns

undefined | StateValue


insert()

insert(key, value): StateMap

Parameters

key: AlignedValue

value: StateValue

Returns

StateMap


keys()

keys(): AlignedValue[]

Returns

AlignedValue[]


remove()

remove(key): StateMap

Parameters

key: AlignedValue

Returns

StateMap


toString()

toString(compact?): string

Parameters

compact?: boolean

Returns

string