View Source BitcoinLib.Script.OpcodeManager (BitcoinLib v0.4.2)

Converts back and forts from script to opcode list

Link to this section Summary

Functions

Encode an opcode into a bitstring

Extract the opcode on the top of the stack given as an argument

Link to this section Functions

@spec encode_opcode(any()) :: bitstring()

Encode an opcode into a bitstring

Link to this function

extract_from_script(script, whole_script)

View Source
@spec extract_from_script(bitstring(), bitstring()) ::
  {:empty_script}
  | {:opcode, any(), bitstring()}
  | {:data, bitstring(), bitstring()}
  | {:error, binary(), bitstring()}

Extract the opcode on the top of the stack given as an argument