1 | <?php |
||
8 | class WitnessScript extends Script |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @var ScriptInterface |
||
13 | */ |
||
14 | private $outputScript; |
||
15 | |||
16 | /** |
||
17 | * @var \BitWasp\Buffertools\BufferInterface |
||
18 | */ |
||
19 | protected $witnessScriptHash; |
||
20 | |||
21 | /** |
||
22 | * @var WitnessProgram|null |
||
23 | */ |
||
24 | private $witnessProgram; |
||
25 | |||
26 | /** |
||
27 | * @var SegwitAddress |
||
28 | */ |
||
29 | private $address; |
||
30 | |||
31 | 8 | /** |
|
32 | * WitnessScript constructor. |
||
33 | 8 | * @param ScriptInterface $script |
|
34 | 2 | * @param Opcodes|null $opcodes |
|
35 | 6 | * @throws WitnessScriptException |
|
36 | 2 | */ |
|
37 | public function __construct(ScriptInterface $script, Opcodes $opcodes = null) |
||
50 | 6 | ||
51 | 4 | /** |
|
52 | * @return WitnessProgram |
||
53 | */ |
||
54 | 6 | public function getWitnessProgram() |
|
62 | 6 | ||
63 | /** |
||
64 | * @return SegwitAddress |
||
65 | */ |
||
66 | public function getAddress() |
||
74 | |||
75 | /** |
||
76 | * @return ScriptInterface |
||
77 | */ |
||
78 | public function getOutputScript() |
||
82 | } |
||
83 |