Class: Bitcoin::Descriptor::Pkh
- Inherits:
-
KeyExpression
- Object
- Expression
- KeyExpression
- Bitcoin::Descriptor::Pkh
- Defined in:
- lib/bitcoin/descriptor/pkh.rb
Overview
pkh() expression
Instance Attribute Summary
Attributes inherited from KeyExpression
Instance Method Summary collapse
Methods inherited from KeyExpression
#args, #extracted_key, #initialize, #musig?, #top_level?
Methods inherited from Expression
#==, #args, #compressed_key?, #derive_path, #extract_pubkey, #to_s, #top_level?
Constructor Details
This class inherits a constructor from Bitcoin::Descriptor::KeyExpression
Instance Method Details
#to_hex ⇒ Object
10 11 12 13 |
# File 'lib/bitcoin/descriptor/pkh.rb', line 10 def to_hex raise ArgumentError, 'musig() is not allowed in top-level pkh().' if musig? super end |
#to_script ⇒ Object
15 16 17 |
# File 'lib/bitcoin/descriptor/pkh.rb', line 15 def to_script Script.to_p2pkh(extracted_key.hash160) end |
#type ⇒ Object
6 7 8 |
# File 'lib/bitcoin/descriptor/pkh.rb', line 6 def type :pkh end |