1 | <?php |
||
12 | class Slip132 |
||
13 | { |
||
14 | /** |
||
15 | * @var KeyToScriptHelper |
||
16 | */ |
||
17 | private $helper; |
||
18 | |||
19 | 22 | public function __construct(KeyToScriptHelper $helper = null) |
|
23 | |||
24 | /** |
||
25 | * @param PrefixRegistry $registry |
||
26 | * @param ScriptDataFactory $factory |
||
27 | * @return ScriptPrefix |
||
28 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
29 | */ |
||
30 | 22 | private function loadPrefix(PrefixRegistry $registry, ScriptDataFactory $factory): ScriptPrefix |
|
35 | |||
36 | /** |
||
37 | * xpub on bitcoin |
||
38 | * @param PrefixRegistry $registry |
||
39 | * @return ScriptPrefix |
||
40 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
41 | */ |
||
42 | 6 | public function p2pkh(PrefixRegistry $registry): ScriptPrefix |
|
46 | |||
47 | /** |
||
48 | * ypub on bitcoin |
||
49 | * @param PrefixRegistry $registry |
||
50 | * @return ScriptPrefix |
||
51 | * @throws \BitWasp\Bitcoin\Exceptions\DisallowedScriptDataFactoryException |
||
52 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
53 | */ |
||
54 | 4 | public function p2shP2wpkh(PrefixRegistry $registry): ScriptPrefix |
|
58 | |||
59 | /** |
||
60 | * Ypub on bitcoin |
||
61 | * @param int $m |
||
62 | * @param int $n |
||
63 | * @param bool $sortKeys |
||
64 | * @param PrefixRegistry $registry |
||
65 | * @return ScriptPrefix |
||
66 | * @throws \BitWasp\Bitcoin\Exceptions\DisallowedScriptDataFactoryException |
||
67 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
68 | */ |
||
69 | 2 | public function p2shP2wshMultisig(int $m, int $n, bool $sortKeys, PrefixRegistry $registry): ScriptPrefix |
|
73 | |||
74 | /** |
||
75 | * zpub on bitcoin |
||
76 | * @param PrefixRegistry $registry |
||
77 | * @return ScriptPrefix |
||
78 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
79 | */ |
||
80 | 6 | public function p2wpkh(PrefixRegistry $registry): ScriptPrefix |
|
84 | |||
85 | /** |
||
86 | * Zpub on bitcoin |
||
87 | * @param int $m |
||
88 | * @param int $n |
||
89 | * @param bool $sortKeys |
||
90 | * @param PrefixRegistry $registry |
||
91 | * @return ScriptPrefix |
||
92 | * @throws \BitWasp\Bitcoin\Exceptions\DisallowedScriptDataFactoryException |
||
93 | * @throws \BitWasp\Bitcoin\Exceptions\InvalidNetworkParameter |
||
94 | */ |
||
95 | 4 | public function p2wshMultisig(int $m, int $n, bool $sortKeys, PrefixRegistry $registry): ScriptPrefix |
|
99 | } |
||
100 |