Skip to content

@aldea/sdk / Exports / Instruction

Class: Instruction ​

Instruction base class.

An Instruction is Aldea's smallest contiguous unit of execution. A transaction consists of a OpCode byte and a number of arguments, depending on the OpCode.

Hierarchy ​

Table of contents ​

Constructors ​

Properties ​

Methods ​

Constructors ​

constructor ​

• new Instruction(opcode): Instruction

Parameters ​

NameType
opcodeOpCode

Returns ​

Instruction

Defined in ​

packages/core/dist/instruction.d.ts:27

Properties ​

opcode ​

• opcode: OpCode

Defined in ​

packages/core/dist/instruction.d.ts:26

Methods ​

toBytes ​

▸ toBytes(): Uint8Array

Returns ​

Uint8Array

Defined in ​

packages/core/dist/instruction.d.ts:29


fromBytes ​

▸ fromBytes(bytes): Instruction

Parameters ​

NameType
bytesUint8Array

Returns ​

Instruction

Defined in ​

packages/core/dist/instruction.d.ts:28