1 | <?php |
||
10 | class Slip132 |
||
11 | { |
||
12 | /** |
||
13 | * @var KeyToScriptHelper |
||
14 | */ |
||
15 | private $helper; |
||
16 | |||
17 | /** |
||
18 | * Slip132PrefixRegistry constructor. |
||
19 | |||
20 | * @param KeyToScriptHelper $helper |
||
21 | */ |
||
22 | 23 | public function __construct(KeyToScriptHelper $helper = null) |
|
26 | |||
27 | /** |
||
28 | * @param PrefixRegistry $registry |
||
29 | * @param ScriptDataFactory $factory |
||
30 | * @return ScriptPrefix |
||
31 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
32 | */ |
||
33 | 23 | private function loadPrefix(PrefixRegistry $registry, ScriptDataFactory $factory) |
|
38 | |||
39 | /** |
||
40 | * xpub on bitcoin |
||
41 | * @param PrefixRegistry $registry |
||
42 | * @return ScriptPrefix |
||
43 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
44 | */ |
||
45 | 6 | public function p2pkh(PrefixRegistry $registry) |
|
49 | |||
50 | /** |
||
51 | * xpub on bitcoin |
||
52 | * @param PrefixRegistry $registry |
||
53 | * @return ScriptPrefix |
||
54 | * @throws \BitWasp\Bitcoin\Exceptions\DisallowedScriptDataFactoryException |
||
55 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
56 | */ |
||
57 | 2 | public function p2shP2pkh(PrefixRegistry $registry) |
|
61 | |||
62 | /** |
||
63 | * ypub on bitcoin |
||
64 | * @param PrefixRegistry $registry |
||
65 | * @return ScriptPrefix |
||
66 | * @throws \BitWasp\Bitcoin\Exceptions\DisallowedScriptDataFactoryException |
||
67 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
68 | */ |
||
69 | 5 | public function p2shP2wpkh(PrefixRegistry $registry) |
|
73 | |||
74 | /** |
||
75 | * Ypub on bitcoin |
||
76 | * @param PrefixRegistry $registry |
||
77 | * @return ScriptPrefix |
||
78 | * @throws \BitWasp\Bitcoin\Exceptions\DisallowedScriptDataFactoryException |
||
79 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
80 | */ |
||
81 | 2 | public function p2shP2wshP2pkh(PrefixRegistry $registry) |
|
85 | |||
86 | /** |
||
87 | * zpub on bitcoin |
||
88 | * @param PrefixRegistry $registry |
||
89 | * @return ScriptPrefix |
||
90 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
91 | */ |
||
92 | 6 | public function p2wpkh(PrefixRegistry $registry) |
|
96 | |||
97 | /** |
||
98 | * Zpub on bitcoin |
||
99 | * @param PrefixRegistry $registry |
||
100 | * @return ScriptPrefix |
||
101 | * @throws \BitWasp\Bitcoin\Exceptions\DisallowedScriptDataFactoryException |
||
102 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
103 | */ |
||
104 | 2 | public function p2wshP2pkh(PrefixRegistry $registry) |
|
108 | } |
||
109 |