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 7 $Bitcoin::Crypto::Transaction::Signer::Role::KeyHash::VERSION = '4.006';
3 7 ▶use v5.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 7 ▶use Mooish::Base -standard, -role;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 7 ▶use Types::Common qw(signature_for); # make sure we don't import 'signature'
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 7 ▶use Bitcoin::Crypto::Types -types;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 7 requires qw(
12 add_signature
13 add_bytes
14 );
15  
16 7 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 15 ▶{
Subroutine _add_pkh: called CC=1 SCAR=0.0
28 15 my ($self, $privkey, $args) = @_;
29  
30 15 $self->add_bytes($privkey->get_public_key->to_serialized);
31 }
32  
33 15 ▶before 'add_signature' => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
34 15 my $self = shift;
35 15 $self->_add_pkh(@_);
36 7 };
37  
38 7 1;
39  
« Crypto/Transaction/Signer/P2WSH.pm ↑ Summary Crypto/Transaction/Signer/Role/ScriptHash.pm »