Crypto/Transaction/Signer/Role/KeyHash.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 30 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Crypto/Transaction/Signer/P2WSH.pm ↑ Summary Crypto/Transaction/Signer/Role/ScriptHash.pm »
1 package Bitcoin::Crypto::Transaction::Signer::Role::KeyHash;
2 5 $Bitcoin::Crypto::Transaction::Signer::Role::KeyHash::VERSION = '4.005';
3 5 ▶use v5.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 5 ▶use Mooish::Base -standard, -role;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use Types::Common -sigs;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 5 ▶use Bitcoin::Crypto::Types -types;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 5 requires qw(
12 add_signature
13 add_bytes
14 );
15  
16 5 signature_for _add_pkh => (
17 method => !!1,
18 head => [InstanceOf ['Bitcoin::Crypto::Key::Private']],
19 named => [
20 sighash => Maybe [PositiveOrZeroInt],
21 {default => undef},
22 ],
23 bless => !!0,
24 );
25  
26 sub _add_pkh
27 8 ▶{
Subroutine _add_pkh: called CC=1 SCAR=0.0
28 8 my ($self, $privkey, $args) = @_;
29  
30 8 $self->add_bytes($privkey->get_public_key->to_serialized);
31 }
32  
33 8 ▶before 'add_signature' => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
34 8 my $self = shift;
35 8 $self->_add_pkh(@_);
36 5 };
37  
38 5 1;
39  
« Crypto/Transaction/Signer/P2WSH.pm ↑ Summary Crypto/Transaction/Signer/Role/ScriptHash.pm »