View Source BitcoinLib.Script.Opcodes.Arithmetic.Sub (BitcoinLib v0.4.7)
Based on https://en.bitcoin.it/wiki/Script
Word OP_SUB Opcode 148 Hex 0x94 Input a b Output out b is subtracted from a.
Link to this section Summary
Link to this section Types
@type t() :: BitcoinLib.Script.Opcodes.Arithmetic.Sub
Link to this section Functions
@spec encode() :: <<_::8>>
Returns <<0x94>>
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.Sub.encode()
<<0x94>>
b is subtracted from a.
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.Sub.execute(
...> %BitcoinLib.Script.Opcodes.Arithmetic.Sub{},
...> [7, 3, 1]
...> )
{:ok, [4, 1]}
@spec v() :: 148
Returns 0x94
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.Sub.v()
0x94