Skip to main content

@midnight-ntwrk/compact-runtime v0.7.0Readme | API


@midnight-ntwrk/compact-runtime v0.7.0 / 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