1 | <?php |
||
14 | class ElectrumKey |
||
15 | { |
||
16 | /** |
||
17 | * @var null|PrivateKeyInterface |
||
18 | */ |
||
19 | private $masterPrivate; |
||
20 | |||
21 | /** |
||
22 | * @var PublicKeyInterface |
||
23 | */ |
||
24 | private $masterPublic; |
||
25 | |||
26 | /** |
||
27 | * @param KeyInterface $masterKey |
||
28 | */ |
||
29 | 5 | public function __construct(KeyInterface $masterKey) |
|
42 | |||
43 | /** |
||
44 | * @return PrivateKeyInterface |
||
45 | */ |
||
46 | 3 | public function getMasterPrivateKey(): PrivateKeyInterface |
|
54 | |||
55 | /** |
||
56 | * @return PublicKeyInterface |
||
57 | */ |
||
58 | 2 | public function getMasterPublicKey(): PublicKeyInterface |
|
62 | |||
63 | /** |
||
64 | * @return BufferInterface |
||
65 | */ |
||
66 | 2 | public function getMPK(): BufferInterface |
|
70 | |||
71 | /** |
||
72 | * @param int $sequence |
||
73 | * @param bool $change |
||
74 | * @return \GMP |
||
75 | */ |
||
76 | 2 | public function getSequenceOffset(int $sequence, bool $change = false): \GMP |
|
81 | |||
82 | /** |
||
83 | * @param int $sequence |
||
84 | * @param bool $change |
||
85 | * @return KeyInterface |
||
86 | */ |
||
87 | 2 | public function deriveChild(int $sequence, bool $change = false): KeyInterface |
|
92 | |||
93 | /** |
||
94 | * @return ElectrumKey |
||
95 | */ |
||
96 | 2 | public function withoutPrivateKey(): ElectrumKey |
|
102 | } |
||
103 |