1 | <?php |
||
7 | class SignData |
||
8 | { |
||
9 | // Todo: review for useful exception? |
||
10 | |||
11 | /** |
||
12 | * @var ScriptInterface |
||
13 | */ |
||
14 | protected $redeemScript = null; |
||
15 | |||
16 | /** |
||
17 | * @var ScriptInterface |
||
18 | */ |
||
19 | protected $witnessScript = null; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | protected $signaturePolicy = null; |
||
25 | |||
26 | /** |
||
27 | * @var bool[] |
||
28 | */ |
||
29 | protected $logicalPath = null; |
||
30 | |||
31 | /** |
||
32 | * @param ScriptInterface $redeemScript |
||
33 | * @return $this |
||
34 | */ |
||
35 | 4 | public function p2sh(ScriptInterface $redeemScript) |
|
40 | |||
41 | /** |
||
42 | * @return bool |
||
43 | */ |
||
44 | 80 | public function hasRedeemScript() |
|
48 | |||
49 | /** |
||
50 | * @return ScriptInterface |
||
51 | */ |
||
52 | 46 | public function getRedeemScript() |
|
60 | |||
61 | /** |
||
62 | * @param ScriptInterface $witnessScript |
||
63 | * @return $this |
||
64 | */ |
||
65 | 4 | public function p2wsh(ScriptInterface $witnessScript) |
|
70 | |||
71 | /** |
||
72 | * @return bool |
||
73 | */ |
||
74 | 80 | public function hasWitnessScript() |
|
78 | |||
79 | /** |
||
80 | * @return ScriptInterface |
||
81 | */ |
||
82 | 40 | public function getWitnessScript() |
|
90 | |||
91 | /** |
||
92 | * @param int $flags |
||
93 | * @return $this |
||
94 | */ |
||
95 | 2 | public function signaturePolicy($flags) |
|
100 | |||
101 | /** |
||
102 | * @return bool |
||
103 | */ |
||
104 | 164 | public function hasSignaturePolicy() |
|
108 | |||
109 | /** |
||
110 | * @return int |
||
111 | */ |
||
112 | 54 | public function getSignaturePolicy() |
|
119 | |||
120 | /** |
||
121 | * @param bool[] $vfPathTaken |
||
122 | * @return $this |
||
123 | */ |
||
124 | 36 | public function logicalPath(array $vfPathTaken) |
|
135 | |||
136 | /** |
||
137 | * @return bool |
||
138 | */ |
||
139 | public function hasLogicalPath() |
||
143 | |||
144 | /** |
||
145 | * @return bool[] |
||
146 | */ |
||
147 | 22 | public function getLogicalPath() |
|
155 | } |
||
156 |