Method: Bitcoin::Descriptor::Expression#compressed_key?
- Defined in:
- lib/bitcoin/descriptor/expression.rb
#compressed_key?(key) ⇒ Boolean
Check whether key is compressed public key or not.
46 47 48 |
# File 'lib/bitcoin/descriptor/expression.rb', line 46 def compressed_key?(key) %w(02 03).include?(key[0..1]) && [key].pack("H*").bytesize == 33 end |