1 | <?php declare(strict_types = 1); |
||
8 | final class Keypair |
||
9 | { |
||
10 | /** |
||
11 | * @var PublicKey |
||
12 | */ |
||
13 | private $publicKey; |
||
14 | /** |
||
15 | * @var PrivateKey |
||
16 | */ |
||
17 | private $privateKey; |
||
18 | |||
19 | /** |
||
20 | * @param PublicKey $publicKey |
||
21 | * @param PrivateKey $privateKey |
||
22 | */ |
||
23 | public function __construct(PublicKey $publicKey, PrivateKey $privateKey) |
||
28 | |||
29 | /** |
||
30 | * @return PrivateKey |
||
31 | */ |
||
32 | public function privateKey(): PrivateKey |
||
36 | |||
37 | /** |
||
38 | * @return PublicKey |
||
39 | */ |
||
40 | public function publicKey(): PublicKey |
||
44 | |||
45 | /** |
||
46 | * @param string $publicKey |
||
47 | * @param string $privateKey |
||
48 | * @return Keypair |
||
49 | */ |
||
50 | public static function fromStrings(string $publicKey, string $privateKey) |
||
57 | } |
||
58 |