Crypto/Transaction/Signer/P2WPKH.pm

filter: Statementstmt 100% 34 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 100% 43 / 43 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Crypto/Transaction/Signer/P2SH.pm ↑ Summary Crypto/Transaction/Signer/P2WSH.pm »
1 package Bitcoin::Crypto::Transaction::Signer::P2WPKH;
2 4 $Bitcoin::Crypto::Transaction::Signer::P2WPKH::VERSION = '4.006';
3 4 ▶use v5.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 ▶use Mooish::Base -standard;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 ▶use Bitcoin::Crypto qw(btc_script);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 4 ▶use Bitcoin::Crypto::Script::Common;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 4 ▶use Bitcoin::Crypto::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 4 ▶use Bitcoin::Crypto::Constants;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 4 ▶use Bitcoin::Crypto::Types -types;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 4 extends 'Bitcoin::Crypto::Transaction::Signer::Segwit';
15  
16 4 has extended 'script' => (
17 lazy => 1,
18 init_arg => undef,
19 );
20  
21 4 with 'Bitcoin::Crypto::Transaction::Signer::Role::KeyHash';
22  
23 sub _build_script
24 7 ▶{
Subroutine _build_script: called CC=1 SCAR=0.0
25 7 my ($self) = @_;
26  
27 7 my $script = $self->transaction->inputs->[$self->signing_index]->utxo->output->locking_script;
28 7 my $runner = $script->run;
29 7 my ($version, $pkh) = @{$runner->stack};
30  
31 7 return Bitcoin::Crypto::Script::Common->new(PKH => $pkh);
32 }
33  
34 4 1;
35  
« Crypto/Transaction/Signer/P2SH.pm ↑ Summary Crypto/Transaction/Signer/P2WSH.pm »