View Source BitcoinLib.Script.Opcodes.Splice.Size (BitcoinLib v0.4.7)

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

Word OP_SIZE Opcode 130 Hex 0x82 Input nothing Output stack size Pushes the string length of the top element of the stack (without popping it).

Link to this section Summary

Functions

Returns <<0x82>>

Pushes the string length of the top element of the stack (without popping it).

v()

Returns 0x82

Link to this section Types

@type t() :: BitcoinLib.Script.Opcodes.Splice.Size

Link to this section Functions

Returns <<0x82>>

examples

Examples

iex> BitcoinLib.Script.Opcodes.Splice.Size.encode()
<<0x82>>
@spec execute(t(), list()) :: {:ok, list()} | {:error, binary()}

Pushes the string length of the top element of the stack (without popping it).

examples

Examples

iex> stack = ["This is a test", 5]
...> %BitcoinLib.Script.Opcodes.Splice.Size{}
...> |> BitcoinLib.Script.Opcodes.Splice.Size.execute(stack)
{:ok, [14, "This is a test", 5]}
@spec v() :: 130

Returns 0x82

examples

Examples

iex> BitcoinLib.Script.Opcodes.Splice.Size.v()
0x82