Class: Bitcoin::Descriptor::Sh

Inherits:
ScriptExpression show all
Defined in:
lib/bitcoin/descriptor/sh.rb

Overview

sh expression

Instance Attribute Summary

Attributes inherited from ScriptExpression

#script

Instance Method Summary collapse

Methods inherited from ScriptExpression

#args, #initialize

Methods inherited from Expression

#==, #args, #compressed_key?, #derive_path, #extract_pubkey, #to_hex, #to_s

Constructor Details

This class inherits a constructor from Bitcoin::Descriptor::ScriptExpression

Instance Method Details

#to_scriptObject



10
11
12
# File 'lib/bitcoin/descriptor/sh.rb', line 10

def to_script
  script.to_script.to_p2sh
end

#top_level?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/bitcoin/descriptor/sh.rb', line 14

def top_level?
  true
end

#typeObject



6
7
8
# File 'lib/bitcoin/descriptor/sh.rb', line 6

def type
  :sh
end