View Source BitcoinLib.Script.Opcodes.Constants.Two (BitcoinLib v0.2.0-pre3)

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

Word OP_2 Opcode 82 Hex 0x52 Input Nothing. Output 2 Description The number 2 is pushed onto the stack.

Link to this section Summary

Functions

Returns <<0x52>>

The number 2 is pushed onto the stack.

v()

Returns 0x52

Link to this section Functions

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

Returns <<0x52>>

examples

Examples

iex> BitcoinLib.Script.Opcodes.Constants.Two.encode() <<0x52>>

@spec execute(%BitcoinLib.Script.Opcodes.Constants.Two{}, list()) :: {:ok, list()}

The number 2 is pushed onto the stack.

examples

Examples

iex> BitcoinLib.Script.Opcodes.Constants.Two.execute( ...> %BitcoinLib.Script.Opcodes.Constants.Two{}, ...> [3] ...> )

Returns 0x52

examples

Examples

iex> BitcoinLib.Script.Opcodes.Constants.Two.v() 0x52