smallInt
scrypt-ts-opcat / Opcode / smallInt
Function: smallInt()
smallInt(
n
):Opcode
Defined in: node_modules/@opcat-labs/opcat/types/opcode.d.cts:82
Converts a small integer (0-16) to its corresponding opcode.
Parameters
n
number
The integer to convert (must be between 0 and 16)
Returns
The corresponding opcode (OP_0 for 0, OP_1+n-1 for 1-16)
Throws
If n is not a number or outside valid range