View Source BitcoinLib.Script.Opcodes.Arithmetic.Within (BitcoinLib v0.4.7)
Based on https://en.bitcoin.it/wiki/Script
Word OP_WITHIN Opcode 165 Hex 0xa5 Input x min max Output out Returns 1 if x is within the specified range (left-inclusive), 0 otherwise.
Link to this section Summary
Functions
Returns <<0xa5>>
Returns 1 if x is within the specified range (left-inclusive), 0 otherwise.
Returns 0xa5
Link to this section Types
@type t() :: BitcoinLib.Script.Opcodes.Arithmetic.Within
Link to this section Functions
@spec encode() :: <<_::8>>
Returns <<0xa5>>
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.Within.encode()
<<0xa5>>
Returns 1 if x is within the specified range (left-inclusive), 0 otherwise.
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.Within.execute(
...> %BitcoinLib.Script.Opcodes.Arithmetic.Within{},
...> [5, 3, 6, 7]
...> )
{:ok, [1, 7]}
@spec v() :: 165
Returns 0xa5
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.Within.v()
0xa5