Exception: BSV::Transaction::VerificationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/bsv/transaction/verification_error.rb

Overview

Error raised during SPV verification.

Carries a machine-readable code alongside a human-readable message, matching the typed error pattern used by the Go SDK (ErrInvalidMerklePath, ErrFeeTooLow, ErrScriptVerificationFailed).

Constant Summary collapse

INVALID_MERKLE_PROOF =
:invalid_merkle_proof
INSUFFICIENT_FEE =
:insufficient_fee
OUTPUT_OVERFLOW =
:output_overflow

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message) ⇒ VerificationError

Returns a new instance of VerificationError.

Parameters:

  • code (Symbol)

    error code

  • message (String)

    human-readable description



20
21
22
23
# File 'lib/bsv/transaction/verification_error.rb', line 20

def initialize(code, message)
  @code = code
  super(message)
end

Instance Attribute Details

#codeSymbol (readonly)

Returns the error code.

Returns:

  • (Symbol)

    the error code



12
13
14
# File 'lib/bsv/transaction/verification_error.rb', line 12

def code
  @code
end