1 | <?php |
||
10 | class SegwitAddress extends Address implements Bech32AddressInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var WitnessProgram |
||
14 | */ |
||
15 | protected $witnessProgram; |
||
16 | |||
17 | /** |
||
18 | * SegwitAddress constructor. |
||
19 | * @param WitnessProgram $witnessProgram |
||
20 | */ |
||
21 | public function __construct(WitnessProgram $witnessProgram) |
||
27 | |||
28 | /** |
||
29 | * @param NetworkInterface|null $network |
||
30 | * @return bool |
||
31 | */ |
||
32 | public function getHRP(NetworkInterface $network = null) |
||
37 | |||
38 | /** |
||
39 | * @return \BitWasp\Bitcoin\Script\ScriptInterface |
||
40 | */ |
||
41 | public function getScriptPubKey() |
||
45 | |||
46 | /** |
||
47 | * @param NetworkInterface|null $network |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getAddress(NetworkInterface $network = null) |
||
56 | } |
||
57 |