View Source BitcoinLib.Script.Opcodes.Constants.One (BitcoinLib v0.4.7)
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
Link to this section Types
@type t() :: BitcoinLib.Script.Opcodes.Constants.One
Link to this section Functions
@spec encode() :: <<_::8>>
Returns <<0x51>>
examples
Examples
iex> BitcoinLib.Script.Opcodes.Constants.One.encode()
<<0x51>>
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