Skip to main content

fromBuffer

@opcat-labs/scrypt-ts-opcat v1.0.4


@opcat-labs/scrypt-ts-opcat / Opcode / fromBuffer

Function: fromBuffer()

fromBuffer(buf): Opcode

Defined in: node_modules/@opcat-labs/opcat/types/opcode.d.cts:61

Creates an Opcode instance from a Buffer.

Parameters

buf

Buffer

The buffer containing the opcode data.

Returns

Opcode

The constructed Opcode instance.

Throws

If the input is not a Buffer.