VmStack
@midnight-ntwrk/onchain-runtime v0.2.2 β’ Readme | API
@midnight-ntwrk/onchain-runtime v0.2.2 / VmStack
Class: VmStack
Represents the state of the VM's stack at a specific point. The stack is an array of StateValues, each of which is also annotated with whether it is "strong" or "weak"; that is, whether it is permitted to be stored on-chain or not.
Constructorsβ
new VmStack()β
new VmStack(): VmStack
Returnsβ
Methodsβ
get()β
get(idx): undefined | StateValue
Parametersβ
β’ idx: number
Returnsβ
undefined | StateValue
isStrong()β
isStrong(idx): undefined | boolean
Parametersβ
β’ idx: number
Returnsβ
undefined | boolean
length()β
length(): number
Returnsβ
number
push()β
push(value, is_strong): void
Parametersβ
β’ value: StateValue
β’ is_strong: boolean
Returnsβ
void
removeLast()β
removeLast(): void
Returnsβ
void
toString()β
toString(compact?): string
Parametersβ
β’ compact?: boolean
Returnsβ
string