View Source BitcoinLib.Script.Opcodes.Arithmetic.GreaterThan (BitcoinLib v0.4.7)
Based on https://en.bitcoin.it/wiki/Script
Word OP_GREATERTHAN Opcode 160 Hex 0xa0 Input a b Output out Returns 1 if a is greater than b, 0 otherwise.
Link to this section Summary
Link to this section Types
@type t() :: BitcoinLib.Script.Opcodes.Arithmetic.GreaterThan
Link to this section Functions
@spec encode() :: <<_::8>>
Returns <<0xa0>>
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.GreaterThan.encode()
<<0xa0>>
Returns 1 if a is greater than b, 0 otherwise.
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.GreaterThan.execute(
...> %BitcoinLib.Script.Opcodes.Arithmetic.GreaterThan{},
...> [2, 3, 1]
...> )
{:ok, [0, 1]}
@spec v() :: 160
Returns 0xa0
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.GreaterThan.v()
0xa0