Blockchain-Ethereum-Keystore

 view release on metacpan or  search on metacpan

lib/Blockchain/Ethereum/Keystore/Keyfile.pm  view on Meta::CPAN

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
}
 
sub _json {
    return shift->{json} //= JSON::MaybeXS->new(utf8 => 1);
}
 
sub import_file {
    my ($self, $file_path, $password) = @_;
 
    my $content = read_file($file_path);
    my $decoded = $self->_json->decode(lc $content);
 
    return $self->_from_object($decoded, $password);
}
 
sub _from_object {
    my ($self, $object, $password) = @_;
 
    my $version = $object->{version};
 
    croak 'Version not supported' unless $version && $version == 3;
 
    return $self->_from_v3($object, $password);



( run in 0.240 second using v1.01-cache-2.11-cpan-1dc43b0fbd2 )