Class: Bitcoin::Descriptor::KeyExpression
- Inherits:
-
Expression
- Object
- Expression
- Bitcoin::Descriptor::KeyExpression
- Defined in:
- lib/bitcoin/descriptor/key_expression.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #args ⇒ Object
-
#extracted_key ⇒ Bitcoin::Key
Get extracted key.
-
#initialize(key) ⇒ KeyExpression
constructor
Constructor.
- #top_level? ⇒ Boolean
Methods inherited from Expression
#==, #compressed_key?, #derive_path, #extract_pubkey, #to_hex, #to_s, #to_script, #type
Constructor Details
#initialize(key) ⇒ KeyExpression
Constructor
8 9 10 11 12 |
# File 'lib/bitcoin/descriptor/key_expression.rb', line 8 def initialize(key) raise ArgumentError, "Key must be string." unless key.is_a? String extract_pubkey(key) @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
4 5 6 |
# File 'lib/bitcoin/descriptor/key_expression.rb', line 4 def key @key end |
Instance Method Details
#args ⇒ Object
14 15 16 |
# File 'lib/bitcoin/descriptor/key_expression.rb', line 14 def args key end |
#extracted_key ⇒ Bitcoin::Key
Get extracted key.
24 25 26 |
# File 'lib/bitcoin/descriptor/key_expression.rb', line 24 def extracted_key extract_pubkey(key) end |
#top_level? ⇒ Boolean
18 19 20 |
# File 'lib/bitcoin/descriptor/key_expression.rb', line 18 def top_level? false end |