View Source BitcoinLib.Script.Opcodes.BitwiseLogic.Equal (BitcoinLib v0.4.2)

Based on https://en.bitcoin.it/wiki/Script#Bitwise_logic

Word OP_EQUAL Opcode 135 Hex 0x87 Input x1 x2 Output True / false Description Returns 1 if the inputs are exactly equal, 0 otherwise

Link to this section Summary

Functions

Returns <<0x87>>

Returns 1 if the inputs are exactly equal, 0 otherwise.

v()

Returns 0x87

Link to this section Functions

@spec encode() :: <<_::8>>

Returns <<0x87>>

examples

Examples

iex> BitcoinLib.Script.Opcodes.BitwiseLogic.Equal.encode()
<<0x87>>
@spec execute(%BitcoinLib.Script.Opcodes.BitwiseLogic.Equal{}, list()) ::
  {:ok, [1 | list()]} | {:ok, [0 | list()]} | {:error, binary()}

Returns 1 if the inputs are exactly equal, 0 otherwise.

examples

Examples

iex> BitcoinLib.Script.Opcodes.BitwiseLogic.Equal.execute(
...>   %BitcoinLib.Script.Opcodes.BitwiseLogic.Equal{},
...>   [3, 3, 4]
...> )
{:ok, [1, 4]}
@spec v() :: 135

Returns 0x87

examples

Examples

iex> BitcoinLib.Script.Opcodes.BitwiseLogic.Equal.v()
0x87