Class: BSV::Overlay::AdmittanceInstructions

Inherits:
Object
  • Object
show all
Defined in:
lib/bsv/overlay/types.rb

Overview

Instructs the Overlay Services Engine about which outputs to admit and which previous outputs to retain. Returned by a Topic Manager.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(outputs_to_admit:, coins_to_retain:, coins_removed: nil) ⇒ AdmittanceInstructions

Returns a new instance of AdmittanceInstructions.

Parameters:

  • outputs_to_admit (Array<Integer>)
  • coins_to_retain (Array<Integer>)
  • coins_removed (Array<Integer>, nil) (defaults to: nil)


40
41
42
43
44
# File 'lib/bsv/overlay/types.rb', line 40

def initialize(outputs_to_admit:, coins_to_retain:, coins_removed: nil)
  @outputs_to_admit = outputs_to_admit
  @coins_to_retain = coins_to_retain
  @coins_removed = coins_removed
end

Instance Attribute Details

#coins_removedArray<Integer>? (readonly)

Returns indices of inputs spending previously-admitted outputs that are now considered spent and removed from the topic (optional).

Returns:

  • (Array<Integer>, nil)

    indices of inputs spending previously-admitted outputs that are now considered spent and removed from the topic (optional)



35
36
37
# File 'lib/bsv/overlay/types.rb', line 35

def coins_removed
  @coins_removed
end

#coins_to_retainArray<Integer> (readonly)

Returns indices of inputs spending previously-admitted outputs to retain.

Returns:

  • (Array<Integer>)

    indices of inputs spending previously-admitted outputs to retain



31
32
33
# File 'lib/bsv/overlay/types.rb', line 31

def coins_to_retain
  @coins_to_retain
end

#outputs_to_admitArray<Integer> (readonly)

Returns indices of admissible outputs in the managed topic.

Returns:

  • (Array<Integer>)

    indices of admissible outputs in the managed topic



28
29
30
# File 'lib/bsv/overlay/types.rb', line 28

def outputs_to_admit
  @outputs_to_admit
end