1 | <?php |
||
16 | class ElectrumKeyFactory |
||
17 | { |
||
18 | /** |
||
19 | * @var EcAdapterInterface |
||
20 | */ |
||
21 | private $adapter; |
||
22 | |||
23 | /** |
||
24 | * @var PrivateKeyFactory |
||
25 | */ |
||
26 | private $privateFactory; |
||
27 | |||
28 | /** |
||
29 | * ElectrumKeyFactory constructor. |
||
30 | * @param EcAdapterInterface|null $ecAdapter |
||
31 | */ |
||
32 | 5 | public function __construct(EcAdapterInterface $ecAdapter = null) |
|
37 | |||
38 | /** |
||
39 | * @param string $mnemonic |
||
40 | * @param ElectrumWordListInterface $wordList |
||
41 | * @return ElectrumKey |
||
42 | * @throws \Exception |
||
43 | */ |
||
44 | 2 | public function fromMnemonic(string $mnemonic, ElectrumWordListInterface $wordList = null): ElectrumKey |
|
50 | |||
51 | /** |
||
52 | * @param BufferInterface $seed |
||
53 | * @return ElectrumKey |
||
54 | * @throws \Exception |
||
55 | */ |
||
56 | 3 | public function getKeyFromSeed(BufferInterface $seed): ElectrumKey |
|
72 | |||
73 | /** |
||
74 | * @param BufferInterface $secret |
||
75 | * @return ElectrumKey |
||
76 | */ |
||
77 | 3 | public function fromSecretExponent(BufferInterface $secret): ElectrumKey |
|
82 | |||
83 | /** |
||
84 | * @param KeyInterface $key |
||
85 | * @return ElectrumKey |
||
86 | */ |
||
87 | 5 | public function fromKey(KeyInterface $key): ElectrumKey |
|
91 | } |
||
92 |