Class: BSV::Registry::ProtocolDefinitionData
- Inherits:
-
Object
- Object
- BSV::Registry::ProtocolDefinitionData
- Defined in:
- lib/bsv/registry/types.rb
Overview
Registry data for a protocol definition.
Instance Attribute Summary collapse
-
#definition_type ⇒ String
readonly
Always DefinitionType::PROTOCOL.
-
#description ⇒ String
readonly
Description of the protocol’s purpose.
-
#documentation_url ⇒ String
readonly
URL to the protocol documentation.
-
#icon_url ⇒ String
readonly
URL or opaque string for the protocol icon.
-
#name ⇒ String
readonly
Human-readable name.
-
#protocol_id ⇒ Array
readonly
Two-element BRC-43 protocol ID, e.g.
-
#registry_operator ⇒ String?
readonly
Public key hex of the registry operator.
Instance Method Summary collapse
-
#initialize(protocol_id:, name:, icon_url:, description:, documentation_url:, registry_operator: nil) ⇒ ProtocolDefinitionData
constructor
A new instance of ProtocolDefinitionData.
Constructor Details
#initialize(protocol_id:, name:, icon_url:, description:, documentation_url:, registry_operator: nil) ⇒ ProtocolDefinitionData
Returns a new instance of ProtocolDefinitionData.
125 126 127 128 129 130 131 132 133 134 |
# File 'lib/bsv/registry/types.rb', line 125 def initialize(protocol_id:, name:, icon_url:, description:, documentation_url:, registry_operator: nil) @definition_type = DefinitionType::PROTOCOL @protocol_id = protocol_id @name = name @icon_url = icon_url @description = description @documentation_url = documentation_url @registry_operator = registry_operator end |
Instance Attribute Details
#definition_type ⇒ String (readonly)
Returns always DefinitionType::PROTOCOL.
99 100 101 |
# File 'lib/bsv/registry/types.rb', line 99 def definition_type @definition_type end |
#description ⇒ String (readonly)
Returns description of the protocol’s purpose.
111 112 113 |
# File 'lib/bsv/registry/types.rb', line 111 def description @description end |
#documentation_url ⇒ String (readonly)
Returns URL to the protocol documentation.
114 115 116 |
# File 'lib/bsv/registry/types.rb', line 114 def documentation_url @documentation_url end |
#icon_url ⇒ String (readonly)
Returns URL or opaque string for the protocol icon.
108 109 110 |
# File 'lib/bsv/registry/types.rb', line 108 def icon_url @icon_url end |
#name ⇒ String (readonly)
Returns human-readable name.
105 106 107 |
# File 'lib/bsv/registry/types.rb', line 105 def name @name end |
#protocol_id ⇒ Array (readonly)
Returns two-element BRC-43 protocol ID, e.g. [1, ‘protomap’].
102 103 104 |
# File 'lib/bsv/registry/types.rb', line 102 def protocol_id @protocol_id end |
#registry_operator ⇒ String? (readonly)
Returns public key hex of the registry operator.
117 118 119 |
# File 'lib/bsv/registry/types.rb', line 117 def registry_operator @registry_operator end |