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