| 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 | 9 | public function __construct(WitnessProgram $witnessProgram)  | 
            |
| 27 | |||
| 28 | /**  | 
            ||
| 29 | * @param NetworkInterface|null $network  | 
            ||
| 30 | * @return bool  | 
            ||
| 31 | */  | 
            ||
| 32 | 6 | public function getHRP(NetworkInterface $network = null)  | 
            |
| 37 | |||
| 38 | /**  | 
            ||
| 39 | * @return \BitWasp\Bitcoin\Script\ScriptInterface  | 
            ||
| 40 | */  | 
            ||
| 41 | 6 | public function getScriptPubKey()  | 
            |
| 45 | |||
| 46 | /**  | 
            ||
| 47 | * @return WitnessProgram  | 
            ||
| 48 | */  | 
            ||
| 49 | public function getWitnessProgram()  | 
            ||
| 50 |     { | 
            ||
| 51 | return $this->witnessProgram;  | 
            ||
| 52 | }  | 
            ||
| 53 | |||
| 54 | /**  | 
            ||
| 55 | * @param NetworkInterface|null $network  | 
            ||
| 56 | * @return string  | 
            ||
| 57 | */  | 
            ||
| 58 | 7 | public function getAddress(NetworkInterface $network = null)  | 
            |
| 64 | }  | 
            ||
| 65 |