encodeNumber

fun encodeNumber(n: Long): ScriptElt

minimal encoding of a number into a script element:

  • OP_0 to OP_16 if 0 <= n <= 16

  • OP_PUSHDATA(encodeNumber(n)) otherwise

Return

a script element that represents n

Parameters

n

input number