1 | <?php |
||
12 | class Slip132 |
||
13 | { |
||
14 | /** |
||
15 | * @var KeyToScriptHelper |
||
16 | */ |
||
17 | private $helper; |
||
18 | |||
19 | /** |
||
20 | * Slip132PrefixRegistry constructor. |
||
21 | |||
22 | * @param KeyToScriptHelper $helper |
||
23 | */ |
||
24 | 22 | public function __construct(KeyToScriptHelper $helper = null) |
|
28 | |||
29 | /** |
||
30 | * @param PrefixRegistry $registry |
||
31 | * @param ScriptDataFactory $factory |
||
32 | * @return ScriptPrefix |
||
33 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
34 | */ |
||
35 | 22 | private function loadPrefix(PrefixRegistry $registry, ScriptDataFactory $factory): ScriptPrefix |
|
40 | |||
41 | /** |
||
42 | * xpub on bitcoin |
||
43 | * @param PrefixRegistry $registry |
||
44 | * @return ScriptPrefix |
||
45 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
46 | */ |
||
47 | 6 | public function p2pkh(PrefixRegistry $registry): ScriptPrefix |
|
51 | |||
52 | /** |
||
53 | * xpub on bitcoin |
||
54 | * @param PrefixRegistry $registry |
||
55 | * @return ScriptPrefix |
||
56 | * @throws \BitWasp\Bitcoin\Exceptions\DisallowedScriptDataFactoryException |
||
57 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
58 | */ |
||
59 | 2 | public function p2shP2pkh(PrefixRegistry $registry): ScriptPrefix |
|
63 | |||
64 | /** |
||
65 | * ypub on bitcoin |
||
66 | * @param PrefixRegistry $registry |
||
67 | * @return ScriptPrefix |
||
68 | * @throws \BitWasp\Bitcoin\Exceptions\DisallowedScriptDataFactoryException |
||
69 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
70 | */ |
||
71 | 4 | public function p2shP2wpkh(PrefixRegistry $registry): ScriptPrefix |
|
75 | |||
76 | /** |
||
77 | * Ypub on bitcoin |
||
78 | * @param PrefixRegistry $registry |
||
79 | * @return ScriptPrefix |
||
80 | * @throws \BitWasp\Bitcoin\Exceptions\DisallowedScriptDataFactoryException |
||
81 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
82 | */ |
||
83 | 2 | public function p2shP2wshP2pkh(PrefixRegistry $registry): ScriptPrefix |
|
87 | |||
88 | /** |
||
89 | * zpub on bitcoin |
||
90 | * @param PrefixRegistry $registry |
||
91 | * @return ScriptPrefix |
||
92 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
93 | */ |
||
94 | 6 | public function p2wpkh(PrefixRegistry $registry): ScriptPrefix |
|
98 | |||
99 | /** |
||
100 | * Zpub on bitcoin |
||
101 | * @param PrefixRegistry $registry |
||
102 | * @return ScriptPrefix |
||
103 | * @throws \BitWasp\Bitcoin\Exceptions\DisallowedScriptDataFactoryException |
||
104 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
105 | */ |
||
106 | 2 | public function p2wshP2pkh(PrefixRegistry $registry): ScriptPrefix |
|
110 | } |
||
111 |