View Source BitcoinLib.Script.Opcodes.Constants.One (BitcoinLib v0.4.2)

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

Word OP_1, OP_TRUE Opcode 81 Hex 0x51 Input Nothing. Output 1 Description The number 1 is pushed onto the stack.

Link to this section Summary

Functions

Returns <<0x51>>

The number 1 is pushed onto the stack.

v()

Returns 0x51

Link to this section Functions

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

Returns <<0x51>>

examples

Examples

iex> BitcoinLib.Script.Opcodes.Constants.One.encode()
<<0x51>>
@spec execute(%BitcoinLib.Script.Opcodes.Constants.One{}, list()) :: {:ok, list()}

The number 1 is pushed onto the stack.

examples

Examples

iex> BitcoinLib.Script.Opcodes.Constants.One.execute(
...>  %BitcoinLib.Script.Opcodes.Constants.One{},
...>  [3]
...> )
{:ok, [1,3]}
@spec v() :: 81

Returns 0x51

examples

Examples

iex> BitcoinLib.Script.Opcodes.Constants.One.v()
0x51