Completed
Pull Request — master (#758)
by thomas
22:04
created

SchnorrSignatureSerializer   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 42.86%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 31
ccs 3
cts 7
cp 0.4286
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A parse() 0 3 1
A serialize() 0 3 1
A __construct() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Serializer\Signature;
4
5
use BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter;
6
use BitWasp\Bitcoin\Crypto\EcAdapter\Key\XOnlyPubKeyInterface;
7
use BitWasp\Bitcoin\Crypto\EcAdapter\Serializer\Key\XOnlyPublicKeySerializerInterface;
8
use BitWasp\Buffertools\BufferInterface;
9
10
class SchnorrSignatureSerializer implements XOnlyPublicKeySerializerInterface
11
{
12
    /**
13
     * @var EcAdapter
14
     */
15
    private $ecAdapter;
16
17
    /**
18
     * @param EcAdapter $ecAdapter
19
     */
20 2361
    public function __construct(EcAdapter $ecAdapter)
21
    {
22 2361
        $this->ecAdapter = $ecAdapter;
23 2361
    }
24
25
    /**
26
     * @param XOnlyPubKeyInterface $publicKey
27
     * @return BufferInterface
28
     */
29
    public function serialize(XOnlyPubKeyInterface $publicKey): BufferInterface
30
    {
31
        throw new \RuntimeException("not implemented");
32
    }
33
34
    /**
35
     * @param BufferInterface $buffer
36
     * @return XOnlyPubKeyInterface
37
     */
38
    public function parse(BufferInterface $buffer): XOnlyPubKeyInterface
39
    {
40
        throw new \RuntimeException("not implemented");
41
    }
42
}
43