View Source BitcoinLib.Script.Opcode behaviour (BitcoinLib v0.4.3)

Opcode behaviour, allowing execution and returning the opcode's integer value

Link to this section Summary

Callbacks

Attemps to execute the opcode against the stack given as an argument, returning either the altered stack or an error

v()

Returns the opcode's value

Link to this section Callbacks

@callback execute(any(), list()) :: {:ok, list()} | {:error, binary()}

Attemps to execute the opcode against the stack given as an argument, returning either the altered stack or an error

@callback v() :: byte()

Returns the opcode's value

Link to this section Functions

@spec execute(%BitcoinLib.Script.Opcodes.Data{value: term()}, list()) :: {:ok, list()}
@spec execute(module(), list()) :: {:ok, list()}