Class: Bitcoin::Descriptor::Wpkh
- Inherits:
-
KeyExpression
- Object
- Expression
- KeyExpression
- Bitcoin::Descriptor::Wpkh
- Defined in:
- lib/bitcoin/descriptor/wpkh.rb
Overview
wpkh() expression
Instance Attribute Summary
Attributes inherited from KeyExpression
Instance Method Summary collapse
-
#initialize(key) ⇒ Wpkh
constructor
A new instance of Wpkh.
- #to_script ⇒ Object
- #type ⇒ Object
Methods inherited from KeyExpression
#args, #extracted_key, #top_level?
Methods inherited from Expression
#==, #args, #compressed_key?, #derive_path, #extract_pubkey, #to_hex, #to_s, #top_level?
Constructor Details
#initialize(key) ⇒ Wpkh
Returns a new instance of Wpkh.
5 6 7 8 |
# File 'lib/bitcoin/descriptor/wpkh.rb', line 5 def initialize(key) super(key) raise ArgumentError, "Uncompressed key are not allowed." unless extract_pubkey(key).compressed? end |